From owner-freebsd-questions Mon Apr 15 0:59:22 2002 Delivered-To: freebsd-questions@freebsd.org Received: from russian-caravan.cloud9.net (russian-caravan.cloud9.net [168.100.1.4]) by hub.freebsd.org (Postfix) with ESMTP id F313337B400 for ; Mon, 15 Apr 2002 00:59:18 -0700 (PDT) Received: from earl-grey.cloud9.net (earl-grey.cloud9.net [168.100.1.1]) by russian-caravan.cloud9.net (Postfix) with ESMTP id 75F2A28C98; Mon, 15 Apr 2002 03:59:18 -0400 (EDT) Date: Mon, 15 Apr 2002 03:59:18 -0400 (EDT) From: Peter Leftwich X-X-Sender: To: Idar Tollefsen Cc: FreeBSD Questions Subject: Re: ADSL gateway - how to set up? In-Reply-To: Message-ID: <20020415035713.F89105-100000@earl-grey.cloud9.net> Organization: Video2Video Services - http://Www.Video2Video.Com MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 15 Apr 2002, Idar Tollefsen wrote: > Hello, 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? > - IT 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" -- Peter Leftwich President & Founder Video2Video Services Box 13692, La Jolla, CA, 92039 USA +1-413-403-9555 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message