Date: Mon, 15 Apr 2002 13:11:36 +0200 From: Jens Rehsack <rehsack@liwing.de> To: Idar Tollefsen <Idar.Tollefsen@baerum.kommune.no> Cc: freebsd-questions@freebsd.org, Hostmaster@Video2Video.Com Subject: Re: ADSL gateway - how to set up? Message-ID: <3CBAB568.9A49784B@liwing.de> References: <scbac8b8.040@mail.baerum.kommune.no>
next in thread | previous in thread | raw e-mail | index | archive | help
Idar Tollefsen wrote: > > >> I have a machine running FreeBSD 4.5 STABLE. This machine has two > >> NICs in it, one connected to the internal LAN and one connected to > >> a ADSL modem (I'm using PPPoE). > >> > >> I've successfully managed to set them up so that the FreeBSD machine > >> has access to the Internet, that works flawlessly, but I'm not able > >> to get this machine to act as a gateway for other computers on my > >> network. > >> > >> For the time being, internal IP addresses are used, but real once > >> will be put in place in the not so distant future. > >> I've done the following: > >> > >> rc.conf: > >> PPP_NAT="YES" > >> ENABLE_GATWAY="YES" > >> > >> ppp.conf: > >> nat enable yes > >> > >> I then tried the following two solutions: > >> > >> -Routing > >> I assigned an IP address to both NICs and set the default gateway > >> route to point to the IP address of the NIC connected to the ADSL > >> modem, which resulted in tun0 becoming the default route. The > >> problem here, I think, was that both NICs couldn't be on the same > >> subnet. Or maybe I shouldn't have assigned an IP address to the NIC > >> connected to the ADSL modem at all? > >> > >> -Bridge > >> I didn't assign any IP address to the NIC connected to the ADSL > >> modem and cleared all routes. The result was that the machine itself > >> added a default gateway route, which still, correctly, was tun0. > >> Neither of these two did any good. Other computers still can't > >> connect trough this machine. And no, there's no firewall in > >> place (yet). > >> > >> How do I do this? I feel I'm not to far off here, just missing that > >> last piece of the puzzle. And what, if anything, would have to > >> change once I switch to "real" IP addresses? > > > If you have ADSL, why then are you using ppp.conf? Why not use > > dhclient (DHCP, or set static values)? > > > > Your answer does seem to lie in the many -- seemingly overlapping -- > > choices in /etc/rc.conf > > > > Try "man ipconfig" > > How do I not use ppp.conf? ppp.conf contains, among other tings and > in addition to the above mentioned lines, the user name and password > I've been assigned from my ISP, information about what interface to > run PPPoE over, etc., etc. > I don't run dhclient because the network in question (consisting > of only a few machines) soon will be assigned "real" IP addresses. > Right now the tun0 interface gets configured from my ISP's DHCP server. > > And what options in rc.conf are overlapping? Don't I need both > "ENABLE_GATEWAY" and "PPP_NAT"? I would suspect that maybe > "PPP_NAT" in rc.conf and "enable ppp nat" in ppp.conf are overlapping, > but not the listed options from rc.conf? > > I don't have access to a FreeBSD machine from here, but I'll try > "man ipconfig" when I do. I tried to look it up trough the FreeBSD > site tough, and it didn't find anything called ipconfig...? > Have a try: http://www.google.com/bsd?hl=en&q=T-DSL T-DSL from Deutsche Telekom is an ADSL connection. Maybe that helps you. -- L i W W W i Jens Rehsack L W W W L i W W W W i nnn gggg LiWing IT-Services L i W W W W i n n g g LLLL i W W i n n g g Friesenstraße 2 gggg 06112 Halle g g g Tel.: +49 - 3 45 - 5 17 05 91 ggg e-Mail: <rehsack@liwing.de> Fax: +49 - 3 45 - 5 17 05 92 http://www.liwing.de/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3CBAB568.9A49784B>