Linux Router Help.

Charles Steinkuehler charles at steinkuehler.net
Sat Feb 8 23:33:47 CST 2003


Aaron wrote:
> Hello all.
>  
> I'm at my wits end.  I want to set up a Linux router.  Very simple. :)  
> I have a network on one side and a network on the other I want to route 
> between. For some reason this is killing me.
>  
> I've searched for almost a week now.  Everything I can find has to do 
> with firewalls or IP masquerading.  I don't want to do any of that.  
> This would be used to route between two public networks.  from what I've 
> been reading, I should be able to do this just by turning IP Forwarding 
> on.  No go.  I've tried adding static routes, turning forwarding on, etc 
> etc etc.
>  
> If anyone has done this and has experience with it, I'd greatly 
> appreciate some advice or a link to some better info.

Your problem is this is too simple, so nobody's written a HOWTO or 
posted instructions.

Basically, just configure the two network interfaces as appropriate and 
connect the wires.  :)

You should have two seperate ethernet interfaces (with proper device 
drivers loaded).  Assign IP addresses and networks two the two 
interfaces and linux will simply route between them (unless you do 
something like enable IPTables/IPChains that blocks the traffic, or turn 
off routing in the kernel via /proc).

Note that the linux system will typically have a single default gateway 
(unless there's no more to this network than the two attached subnets), 
and systems on the two networks will need a properly configured default 
gateway setting and perhaps a static route to the other network (depends 
on your network architecture).

If you can't get this working, post the output of the "ip addr" and "ip 
route" commands, describe a bit more about your network (specifically if 
  there are any other networks involved, or if these are two isolated 
subnets), and describe exactly how the network is broken (ie try to ping 
to and across the router by IP address from both networks and report the 
results).  You should also verify you have no firewall rules in place 
preventing the traffic from crossing the router (ipchains -nvL or 
iptables -nvL, as appropriate).

NOTE:  It's quite possible the problem could lie with the clients on 
your network and *NOT* your router, if you don't have default routes 
and/or static routes setup properly.  Please include the ip address 
configuration and routing table information from the clients you're 
working with along with the above information if you continue to have 
problems.

-- 
Charles Steinkuehler
charles at steinkuehler.net




More information about the Kclug mailing list