Re: Dialing into Internet with one PC and using that PC as gateway for rest of LAN

From: David Efflandt (efflandt_at_xnet.com)
Date: 03/26/04


Date: Fri, 26 Mar 2004 20:10:53 +0000 (UTC)

On Fri, 26 Mar 2004 09:55:27 -0600, Alex <alex@totallynerd.com> wrote:
> Hi all,
>
> I have a small P-133 I'd like to use as a router/gateway to the Internet, and
> currently my only connectivity is dialup (which will change soon).
>
> My internal LAN is 192.168.x.x, so how do get all 192.168.x.x traffic to use
> eth0 and everything else go out through ppp0 (or eth1 once my broadband is setup
> in a month or so)? Also, how do I setup this system as a gateway for the other
> PC's on my network? On my other systems, I'm assuming the P-133 system would be
> both gateway and DNS, so anything special regarding DNS on it? I've never done
> any of this before, so sorry for the general questions.

If your nics and routing are properly configured, access to internet or
LAN from that box should simply work (assuming valid nameservers in
/etc/resolv.conf and firewall not blocking internet access). I see so
many people setting a bogus default route to their own IP, or to a LAN, or
with all zeros. Any of these interfere with pppd's defaultroute option.

Normally the only "default" route should be towards the internet, you your
internet router should only end up with a default route when pppd is
connected. Any local routing that has to go through another local router
should use network specific routing with the other router as gateway (not
a default route).

And for your 192.168.x.x network to reach the internet, they should route
to the Linux LAN IP, and your Linux router would need to masquerade them
as its public IP.

-- 
David Efflandt - All spam ignored  http://www.de-srv.com/


Relevant Pages

  • Re: Cannot Share internet thru dual NICs
    ... "You will also need to add a route to your Internet router. ... You need to route traffic for 192.168.254 to the RRAS/NAT router. ... > do an ipconfig /release and ipconfig /renew on the clients to get the new ...
    (microsoft.public.win2000.ras_routing)
  • Re: XP unable to ping.
    ... I did a route print and saw nothing out of the ordinary. ... to go to the router address. ... >> system can ping the Internet DNS server any time. ... >> to route packets to the router for another private LAN. ...
    (microsoft.public.windowsxp.work_remotely)
  • Re: "A Network Cable is Unplugged" error
    ... and then I lose internet. ... However, my laptop works perfectly, loses no internet connectivity ... I am using cable internet with a Linksys router and I have swapped ... around and replaced the cables, ...
    (microsoft.public.windowsxp.general)
  • Re: [SLE] Routing issues with eth1(internal) & eth2(external)
    ... Let the router do the job it was designed for, ... >> from the internet you can then access all of the internal machines via ... Liberty1 is to be a development server. ...
    (SuSE)
  • Router No Longer Routes
    ... The Linux system that has been serving as a router (mostly for the ... benefit of my roommate and for Internet connectivity for other project ... connect to the Internet directly through the cable modem (hooked up via ... settings, and the settings after the outage, are the DNS servers. ...
    (Debian-User)