On Mon, 2003-02-10 at 19:25, fsanta wrote:
On Monday 10 February 2003 17:07, Anders Johansson wrote:
On Mon, 2003-02-10 at 19:01, fsanta wrote:
Gateway: eth0 = 192.168.1.1 Server: 192.168.2.1 Client 192.168.2.2
Why do you have the gateway on a different subnet from the hosts? Is your routing really set up for that (i.e. can your hosts even ping the gateway)?
Should I change to 192.168.1.something?
It's not necessary. If you have a particular reason for splitting the subnets that's fine. But you need to set up the routing tables if you want the machines to reach the internet.
No, the host's can't ping the gateway, but they can see the internet via squid. It's just that I want the clients to do ftp and ssh etc too.
What do the routing tables look like on the various machines (the output of "route -n")?
On the server:
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 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.1 0.0.0.0 UG 0 0 0 eth0
Looks ok. The server knows how to get to 192.168.2.0/24, 192.168.1.0/24 and everywhere else (0.0.0.0, the default entry).
On the client:
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
Doesn't look ok. The clients only know how to get to 192.168.2.0/24. If you want them to be able to reach the internet directly you have to tell them how to get to the default gateway, and you have to tell them what the default gateway is. route add -net 192.168.1.0/24 dev eth0 route add default gw 192.168.1.1