Routing - no path for one machine, OK for another
I have a weird routing problem. The machine configurations are below.
I can communicate (eg ping, ssh etc):
A to B,
B to C,
C to B,
B to A
but not A to C (or anywhere else on the subnet 192.168.10.x or wider), which would indicate a route/masquerading problem.
BUT I can ping etc D to C ( or wider, ie between the two nets) and vice versa, which indicates that the iptables etc on B are OK and that it is a routing problem on A.
I can't see what it is.
I haven't got any other machines on the 192.168.20.x subnet to test.
This means that in order to login to A from anywhere else, I have to ssh to B first then ssh into A. More importantly it means that I can't browse or download to A directly as the internet connection is via B and a further machine (192.168.10.81) etc.
This setup used to work - honest - before I powered A down some time ago as it is so noisy (it is a rack-mountable server by my desk - ugh what dB!).
Here are the setups - if there is anything else needed let me know. Needless to say I have restarted the networks /etc/init.d/network restart on each machine when anything was changed.
Machine A:
eth0 is 192.168.20.1
RH8 2.4.22 modified
route -n:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.10.0 192.168.20.2 255.255.255.255 UGH 0 0 0 eth0
192.168.20.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.20.2 0.0.0.0 UG 0 0 0 eth0
Machine B:
eth0 is 192.168.10.1
eth1 is 192.168.20.2
RH8 2.4.20-28.8
route -n:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.20.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.10.81 0.0.0.0 UG 0 0 0 eth0
iptables commands:
#!/bin/sh
ETH0="eth0"
ETH1="eth1"
iptables -P INPUT ACCEPT
iptables -F INPUT
iptables -P OUTPUT ACCEPT
iptables -F OUTPUT
iptables -P FORWARD ACCEPT
iptables -F FORWARD
iptables -t nat -F
iptables -A FORWARD -i $ETH0 -o $ETH1 -j ACCEPT
iptables -A FORWARD -i $ETH1 -o $ETH0 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
Machine C:
eth0 is 192.168.10.6
RH8 2.4.18-19.8.0
route -n:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.20.0 192.168.10.1 255.255.255.255 UGH 0 0 0 eth1
192.168.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.10.81 0.0.0.0 UG 0 0 0 eth1
Machine D: 192.168.20.109
Win98: route print
Active Routes:
Network Address Netmask Gateway Address Interface Metric
0.0.0.0 0.0.0.0 192.168.20.2 192.168.20.109 1
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.20.0 255.255.255.0 192.168.20.109 192.168.20.109 1
192.168.20.109 255.255.255.255 127.0.0.1 127.0.0.1 1
192.168.20.255 255.255.255.255 192.168.20.109 192.168.20.109 1
224.0.0.0 224.0.0.0 192.168.20.109 192.168.20.109 1
255.255.255.255 255.255.255.255 192.168.20.109 192.168.20.109 1
|