Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Aug 2013 08:58:55 -0400
From:      Fbsd8 <fbsd8@a1poweruser.com>
To:        Karl Pielorz <kpielorz_lst@tdx.co.uk>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: jail.conf ignoring exec.fib?
Message-ID:  <520B7F0F.7020006@a1poweruser.com>
In-Reply-To: <98486B2D79D00F0898B7C9E6@Mail-PC.tdx.co.uk>
References:  <98486B2D79D00F0898B7C9E6@Mail-PC.tdx.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help
Karl Pielorz wrote:
> 
> I'm running 9.2-RC2 amd64 on a system, with a number of jails. The jails 
> are setup using '/etc/jail.conf' - but the exec.fib in jail.conf seems 
> to be being ignored?
> 
> e.g. in /etc/jail.conf I have:
> 
> "
> testjail {
>        jid = 100;
>        exec.fib = 1;   <---- Set FIB 1
>        path = /usr2/jails/testjail;
>        host.hostname = testjail.somedomain.com;
>        ip4.addr = 192.168.0.40;
>        mount.devfs;
> }
> "
> 
> But if I run up that jail and connect to it, 'netstat -r -n' shows it's 
> still using fib 0 (i.e. the default gateway is set).
> 
> If before running the jail, I do 'setfib 1 route add default 
> 192.186.0.90' - when the jail is run up, again - netstat within it still 
> shows the systems default gateway, not the gateway from fib 1?
> 
> -Karl

The jail(8) man page lacks details about how to use exec.fib.

It requires either a new kernel (with "options ROUTETABLES=2" or however 
many you want), or a boot-time setting with "net.fibs=2" in 
/boot/loader.conf (requiring a reboot).

setfib 1 route add default 198.192.64.21
creates routing table number 1 with that IP address.

In this example exec.fib="1" would be coded.

See setfib(8) and setfib(2) for details.






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?520B7F0F.7020006>