How to use pf with vimage jails?

Kristof Provost kristof at sigsegv.be
Wed May 4 14:54:04 UTC 2016


> On 04 May 2016, at 16:48, Alan Somers <asomers at freebsd.org> wrote:
> 
> On Wed, May 4, 2016 at 4:23 AM, Kristof Provost <kristof at sigsegv.be <mailto:kristof at sigsegv.be>> wrote:
> 
> > On 04 May 2016, at 04:55, Alan Somers <asomers at freebsd.org <mailto:asomers at freebsd.org>> 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.
> 
> That’s supported, and really no different from configuring pf otherwise.
> Just treat the vimage jails as if they were on different machines, behind your firewall.
> 
> Regards,
> Kristof
> 
> 
> 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.
> 
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 <https://www.freebsd.org/doc/en/articles/filtering-bridges/article.html>
> 
That’s a filtering bridge, which is a different use case. On a filtering bridge the firewall device doesn’t 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’d discourage you from using this.

Regards,
Kristof



More information about the freebsd-net mailing list