From owner-freebsd-questions@FreeBSD.ORG Wed Aug 14 12:59:11 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 895E6949 for ; Wed, 14 Aug 2013 12:59:11 +0000 (UTC) (envelope-from fbsd8@a1poweruser.com) Received: from mailch-3.name-services.com (mailch-3.name-services.com [98.124.252.185]) by mx1.freebsd.org (Postfix) with ESMTP id 735A92936 for ; Wed, 14 Aug 2013 12:59:11 +0000 (UTC) Received: from mailch.name-services.com (localhost [127.0.0.1]) by mailch.name-services.com (Postfix) with SMTP id B9CCD62CC5E; Wed, 14 Aug 2013 05:59:07 -0700 (PDT) X-Sender-Id: 173.88.196.224 Received: from mail-24.name-services.com (sjl0vwsmail09.prod.dm.local [10.7.17.59]) by 0.0.0.0:2500 (trex/4.8.23); Wed, 14 Aug 2013 12:59:07 GMT X-Pool-Id: 4 Received: from [10.0.10.1] (cpe-173-88-196-224.neo.res.rr.com [173.88.196.224]) by mail-24.name-services.com with SMTP; Wed, 14 Aug 2013 05:58:58 -0700 Message-ID: <520B7F0F.7020006@a1poweruser.com> Date: Wed, 14 Aug 2013 08:58:55 -0400 From: Fbsd8 User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: Karl Pielorz Subject: Re: jail.conf ignoring exec.fib? References: <98486B2D79D00F0898B7C9E6@Mail-PC.tdx.co.uk> In-Reply-To: <98486B2D79D00F0898B7C9E6@Mail-PC.tdx.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Aug 2013 12:59:11 -0000 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.