[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Internet access.



> This seems like a very basic task, and I have yet to locate a how-to
> that definitively addresses the issue.
> I have a linux box in a heterogenous network, there is a proxy out
> on that network that I am able to use for internet access.  How do I
> configure this linux box to discern the difference between
> LAN/WAN traffic and Internet traffic?  Our IP setup whout make
> this rather simple in that anything from 10.x.x.x is LAN/WAN and
> everything else it internet.
> Just a link to the appropriate How-to(s) along with the obligatory
> RTFM comments would be appreciated.  Thank you.

This is really an IP routing issue, and not specific at all to Linux.

For example:
Destination     Gateway         Genmask         Flags   MSS Window  
irtt Iface
192.168.3.1     *               255.255.255.255 UH        0 0          
0 eth0
192.168.1.3     *               255.255.255.255 UH        0 0          
0 ppp1
255.255.255.255 *               255.255.255.255 UH        0 0          
0 eth0
209.69.64.1     *               255.255.255.255 UH        0 0          
0 ppp0
192.168.3.0     *               255.255.255.0   U         0 0          
0 eth0
192.168.1.0     *               255.255.255.0   U         0 0          
0 ppp1
127.0.0.0       *               255.0.0.0       U         0 0          
0 lo
default         *               0.0.0.0         U         0 0          
0 ppp0

is my routing table as of right now (they change around a little).

route add -net default dev ppp0

will sent all traffic I don't have a specific route for out ppp0.

If I had a firewall (like I do in my office), I'd do something like:

route add -net default gw firewall

Will send all traffic I don't have a specific route for to the host 
firewall to be sent on from there.

You should be able to set your default gateway in the redhat control 
panel.  Then it will be set everytime your machine starts.  Or else 
you could setup a routing protocol.  If your IS guys run RIP you 
simply have to start "routed -q" and it will take care of your routing 
for you.  If you run something like OSPF you'll need a more advanced 
daemon like Zebra.  If you network has a routing protocol you REALLY 
want to use it.