Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Aug 2003 00:06:08 +0200
From:      Francesco Casadei <fcasadei@inwind.it>
To:        freebsd-questions@FreeBSD.org
Cc:        Jacob Vennervald <jvennervald@proventum.net>
Subject:   Re: NATD and PPP problem
Message-ID:  <20030805220608.GA3046@goku.kasby>
In-Reply-To: <3F2FC71A.8040104@proventum.net>
References:  <3F2FC71A.8040104@proventum.net>

next in thread | previous in thread | raw e-mail | index | archive | help

--5mCyUwZo2JvN/JJP
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Tue, Aug 05, 2003 at 05:02:50PM +0200, Jacob Vennervald wrote:
> Hi
>=20
> I've installed a FreeBSD 4.8 machine, which I wanna use as a=20
> NAT/Router/Firewall.
> I have setup the pppoe connection which works perfectly and then I've=20
> tried to setup the machine as a NAT Router by setting the following in=20
> the rc.conf:
> firewall_enable=3D"YES"
> firewall_type=3D"open"
> natd_enable=3D"YES"
> natd_interface=3D"tun0"
> But when I restart the machine it gives me the following error:
> "Firewall rules loaded, starting divert daemons: natdnatd: tun0: cannot=
=20
> get interface address"
>=20
> When I log in and type "ifconfig" I can also see that the tun0 interface=
=20
> doesn't exist, but when I turn off the two natd settings in rc.conf and=
=20
> reboot it does exist.
>=20
> Can anybody help?
>=20
> Cheers,
> Jacob Vennervald
>=20
> _______________________________________________
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o=
rg"
> 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=3D"-dynamic"

Even if you solved the problem, you may also want to try this solution.

	Francesco Casadei
--=20
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


--5mCyUwZo2JvN/JJP
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (FreeBSD)

iD8DBQE/MCpPfsM3XxZOsXsRAvF0AKDyypsLJL1H6oPBzAdy7paaojOBgACgyl4M
nhx6OUdtaPTgUMAxGUatjpI=
=Z0R0
-----END PGP SIGNATURE-----

--5mCyUwZo2JvN/JJP--



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