From owner-freebsd-questions@FreeBSD.ORG Tue Aug 5 23:27:13 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E76437B401 for ; Tue, 5 Aug 2003 23:27:13 -0700 (PDT) Received: from smtpgate.proventum.net (smtpgate.proventum.net [195.216.217.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id 406E243FD7 for ; Tue, 5 Aug 2003 23:27:12 -0700 (PDT) (envelope-from jvennervald@proventum.net) Received: from jvennervald.intra.proventum.net (jvennervald.intra.proventum.net [10.0.2.133]) by smtpgate.proventum.net (Postfix) with ESMTP id 426F052932; Wed, 6 Aug 2003 08:27:08 +0200 (CEST) From: Jacob Vennervald Madsen To: Francesco Casadei In-Reply-To: <20030805220608.GA3046@goku.kasby> References: <3F2FC71A.8040104@proventum.net> <20030805220608.GA3046@goku.kasby> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 (1.0.8-11) Date: 06 Aug 2003 08:27:07 +0200 Message-Id: <1060151230.1078.2.camel@jvennervald.intra.proventum.net> Mime-Version: 1.0 cc: FreeBSD Mailing lists Subject: Re: NATD and PPP problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Aug 2003 06:27:13 -0000 Hi Thanks a lot! The natd_flag="-dynamic" worked. Aparently the pppoe interface tun0 wasn't active yet when natd was started so it couldn't find the interface. Cheers, Jacob Vennervald On Wed, 2003-08-06 at 00:06, Francesco Casadei wrote: > On Tue, Aug 05, 2003 at 05:02:50PM +0200, Jacob Vennervald wrote: > > Hi > > > > I've installed a FreeBSD 4.8 machine, which I wanna use as a > > NAT/Router/Firewall. > > I have setup the pppoe connection which works perfectly and then I've > > tried to setup the machine as a NAT Router by setting the following in > > the rc.conf: > > firewall_enable="YES" > > firewall_type="open" > > natd_enable="YES" > > natd_interface="tun0" > > But when I restart the machine it gives me the following error: > > "Firewall rules loaded, starting divert daemons: natdnatd: tun0: cannot > > get interface address" > > > > When I log in and type "ifconfig" I can also see that the tun0 interface > > doesn't exist, but when I turn off the two natd settings in rc.conf and > > reboot it does exist. > > > > Can anybody help? > > > > Cheers, > > Jacob Vennervald > > > > _______________________________________________ > > freebsd-questions@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > > end of the original message > > Use the -dynamic flag if the tun0 interface is not configured when natd > starts up. From natd(8) manpage: > > [...] > -dynamic > If the -n or -interface option is used, natd will monitor the > routing socket for alterations to the interface passed. If > the interface's IP number is changed, natd will dynamically > alter its concept of the alias address. > [...] > > Add the following line to /etc/rc.conf: > > natd_flags="-dynamic" > > Even if you solved the problem, you may also want to try this solution. > > Francesco Casadei > -- > You can download my public key from http://digilander.libero.it/fcasadei/ > or retrieve it from a keyserver (pgpkeys.mit.edu, wwwkeys.pgp.net, ...) > > Key fingerprint is: 1671 9A23 ACB4 520A E7EE 00B0 7EC3 375F 164E B17B > -- Venlig hilsen / Best regards, Jacob Vennervald System Developer Proventum Solutions ApS Tuborg Boulevard 12 2900 Hellerup Denmark Phone: +45 36 94 41 66 Mobile: +45 61 68 58 51