Date: Sun, 10 Dec 2000 22:31:58 -0500 (EST) From: David Raistrick <keen@damoe.wireless-isp.net> To: Sean Peck <speck@newsindex.com> Cc: Chris Hill <chris@monochrome.org>, freebsd-questions@FreeBSD.ORG Subject: Re: Configuring Gateway/NAT on Freebsd Message-ID: <Pine.BSF.4.21.0012102217320.61629-100000@damoe.wireless-isp.net> In-Reply-To: <Pine.BSF.4.10.10012101903150.14499-100000@www.newsindex.com>
index | next in thread | previous in thread | raw e-mail
On Sun, 10 Dec 2000, Sean Peck wrote:
> I have one machine, that has 1 NIC card, this card is configured with the
> ifconfig commands to be listening to both 1 public IP address, and to
> 172.16.0.1
> I have configured tun0 to be 172.16.0.1 to public IP (or at least I
> believe I have)
Ok, this appears to be one of the problems.
tun0 is for userland ppp (vs ppp0 for kernel ppp)
You do not need it.
What you DO need (and i'll note that I can only say this in concept. I've
not dealt with nat on a BSD machine since 2.2something..but i do it all
day long with Cisco:) is to
ifconfig xl0 inet 64.2.61.236 netmask 255.255.255.0 (assuming that
64...236 is the IP assigned by your provider, netmask as well)
route add default 64.2.61.X (as provided by the ISP for your default
route)
then,
ifconfig xl0 alias 172.16.0.1 netmask 255.255.255.0
Then you need to configure natd to use xl0 for all outbound traffic, with
the 64.2.61.236 IP.
so ( a quick scan of man natd )
natd -a 63.2.61.236
might do it.
Of course, all this assumes
sysctl -w net.inet.ip.forwarding=1
This is the "interesting project" that has been mentioned.
It has also been mentioned that natd has been known to go haywire when
used in this way (only one NIC).
Should this be the case, you will need to adjust your situation
accordingly and get a second NIC. Plug your dsl modem directly into this
nic, (if you use a straight-through cable to the hub from the modem,
you'll need a crossover...or versavisa) and then just
ifconfig xl1 inet 64.2.61.236 netmask 255.255.255.0
(same defroute)
natd -i xl1
that should do it.
Should i get entirely bored, and you folks want me to, i'd be glad
reconfigure my testlab at work to see if this works with only one
NIC...
later...david
--
David Raistrick Digital Wireless Communications
davidr@dwcinet.com
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0012102217320.61629-100000>
