Date: Tue, 5 Feb 2008 17:37:25 +0100 From: Kurt Jaeger <lists@c0mplx.org> To: Albert Shih <Albert.Shih@obspm.fr> Cc: freebsd-jail@freebsd.org, freebsd-questions@freebsd.org Subject: Re: How to use two interface with jail Message-ID: <20080205163725.GK1757@home.c0mplx.org> In-Reply-To: <20080205162327.GF94606@pcjas.obspm.fr> References: <20080205162327.GF94606@pcjas.obspm.fr>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi! > 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. Assuming you can use ipfw, here's an example: - Interfaces: if1: 192.168.1.1, gateway 192.168.1.254 if2: 192.168.2.1, gateway 192.168.2.254 - system uses 192.168.1.254 as its default gateway. - IP-ranges for jails are in the 192.168.2.0/24 range. - Then add the following ipfw rule: /sbin/ipfw add 1000 fwd 192.168.2.254 ip from 192.168.2.0/24 to any out via if2 Give it a try. -- pi@opsec.eu +49 171 3101372 12 years to go !
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080205163725.GK1757>