How to use two interface with jail

Glen Barber glen.j.barber at
Wed Feb 6 00:11:12 UTC 2008

On Feb 5, 2008 11:23 AM, Albert Shih <Albert.Shih at> wrote:

> Hi all
> I've a server to run FreeBSD 7.0 with jail.
> On the server the are two physical interfaces.
> This two interfaces are on two different ip subnet.
> All jail are on the second interface
> How can I make
>        all traffic from the server/for the server pass through the first
>        interface
>        all traffic from the jail /for the jail pass through the second
>        interface.
> In fact : How can make two «default router» on for the server, another for
> all jail.
> Regards

What I did on a test server was use 1 interface for tx/rx data, and a
'dummy' device, a physical, unattached card, and assigned it an IP in

## LAN

## Jail LAN
ifconfig_bfe0="inet netmask"
ifconfig_bfe0_alias0="inet netmask"

I then used pf to route data. I wrote a small tutorial on this, perhaps the
concept will help you:


Glen Barber

More information about the freebsd-questions mailing list