On 18 Jun 2003 12:43:34 +1200
Jeff Hoare
Hi, I have a small network setup but can't seem to get the routing right. I have tried reading the documentation, but its still not right. So I was wondering if anyone can provide some help.
The server has 2 ethernet cards setup: eth0 (192.168.1.53) points to an adsl router 192.168.1.2, which in turn points to the outside world.
eth1 (192.168.2.1) points to the internal network.
I would like to have the internal network on eth1 route through eth0 to the outside world.
Currently the routing table is configured as: 192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 0.0.0.0 192.168.1.2 0.0.0.0 UG 0 0 0 eth0
I know this is not right, as the 192.168.2.0 network can't see the 192.168.1.0 network. I thought that by virtue of the fact both cards were on the same machine it would be able to route packets between them, but i guess not. What you want to do is NAT. This is supported in Linux by a feature called IP masquerading. IP Masquerading is part of the firewall. I suggest you look at the docs for SuSE Firewall.
The routing table above should allow all systems on your 192.168.2
communicate with the 192.168.1.53 machine, but not get out of your
network.
--
Jerry Feldman