Date: Wed, 6 Feb 2008 15:00:11 +0100 From: Albert Shih <Albert.Shih@obspm.fr> To: Kurt Jaeger <lists@c0mplx.org> Cc: freebsd-jail@freebsd.org, freebsd-questions@freebsd.org Subject: Re: How to use two interface with jail Message-ID: <20080206140011.GI3734@pcjas.obspm.fr> In-Reply-To: <20080205163725.GK1757@home.c0mplx.org> References: <20080205162327.GF94606@pcjas.obspm.fr> <20080205163725.GK1757@home.c0mplx.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Le 05/02/2008 à 17:37:25+0100, Kurt Jaeger a écrit > 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. Thanks for your help. It's working. I'm using pf (old habit) and with this single ligne pass out route-to (bce1 router_address) from <jail> to ! network_CIDR it's working. Thanks. Regards. -- Albert SHIH Observatoire de Paris Meudon SIO batiment 15 Heure local/Local time: Mer 6 fév 2008 14:58:45 CET
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080206140011.GI3734>