From owner-freebsd-net@freebsd.org Wed May 4 14:54:04 2016 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2048BB2D2B6 for ; Wed, 4 May 2016 14:54:04 +0000 (UTC) (envelope-from kristof@sigsegv.be) Received: from venus.codepro.be (venus.codepro.be [IPv6:2a01:4f8:162:1127::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.codepro.be", Issuer "Gandi Standard SSL CA 2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B54DB1EE9; Wed, 4 May 2016 14:54:03 +0000 (UTC) (envelope-from kristof@sigsegv.be) Received: from [IPv6:::1] (vega.codepro.be [IPv6:2a01:4f8:162:1127::3]) (Authenticated sender: kp) by venus.codepro.be (Postfix) with ESMTPSA id 934DA324B8; Wed, 4 May 2016 16:54:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sigsegv.be; s=mail; t=1462373640; bh=u6s6H2B4UTJFMJxoGxabqgQ8/cmCq91FhIzCB7/Ov5s=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=tDxAvzbaF5F3LJVGGElH2e/0RrInVQ96VOnx+sBholQkSsCoWF8vOfBoArKwahaJN 0HMBwcxzZAhML6WiCT8bDP1cG18e1pANIWl8X+Qb+qSzOZ91k5jVwOAguPq/6ZdLXC 0iXHtKn3V1Bq2Cwly9QnUAtjBn6IsPoKEiAnyCj8= Subject: Re: How to use pf with vimage jails? Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) From: Kristof Provost X-Checked-By-Nsa: Probably In-Reply-To: Date: Wed, 4 May 2016 16:53:59 +0200 Cc: FreeBSD Net Message-Id: <4EBFFB72-B185-4272-ACDF-B6B576ADE0D2@sigsegv.be> References: <67045371-07B8-4718-8A8B-98E3FBFF994E@sigsegv.be> To: Alan Somers X-Mailer: Apple Mail (2.3124) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 May 2016 14:54:04 -0000 > On 04 May 2016, at 16:48, Alan Somers wrote: >=20 > On Wed, May 4, 2016 at 4:23 AM, Kristof Provost > wrote: >=20 > > On 04 May 2016, at 04:55, Alan Somers > wrote: > > > > Is there any documentation on how to run pf on a host, using it to = control > > access to vimage jails? I see that only ipfw can be run from = _inside_ of > > the jail, but I'm interested in running pf _outside_ of the jail. >=20 > That=E2=80=99s supported, and really no different from configuring pf = otherwise. > Just treat the vimage jails as if they were on different machines, = behind your firewall. >=20 > Regards, > Kristof >=20 >=20 > Then maybe it's the bridged aspect that's screwing me up. Is there a = guide for using pf on bridged interfaces? All I can find is this guide = for ipfw. >=20 Treat a bridge as a simple interface, pretend that the bridge members = are just devices plugged into a switch connected to the bridge = interface. > https://www.freebsd.org/doc/en/articles/filtering-bridges/article.html = >=20 That=E2=80=99s a filtering bridge, which is a different use case. On a = filtering bridge the firewall device doesn=E2=80=99t need an IP, instead = interpreting the layer 2 packets. pf can do this (see the net.link.bridge.pfil_bridge sysctl), but there = are major problems with the implementation. I=E2=80=99d discourage you = from using this. Regards, Kristof