i have two computers.
computer A network devices:
dev address
-------------
wlan0 192.168.1.2
eth0 10.42.0.1
computer A routing table:
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
10.42.0.0 10.42.0.1 255.255.255.0 UG 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
computer B network devices:
dev address
-------------
eth0 10.42.0.2
computer B routing table:
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.42.0.1 0.0.0.0 UG 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
So computers A and B are connected via ethernet through a switch and computer A is connected to another network (192.168.1.0) though a wireless router (192.168.1.1). I thought this setup would connect the two networks.
On computer B, I try to ping the wireless router
ping 192.168.1.1
I'm running iptraf on computer A and I can see the request being routed through computer A
ICMP echo req (84 bytes) from 10.42.0.2 to 192.168.1.1 on eth0
but there is no response.
I thought I understood the route table but I guess I was wrong. Please help!
EDIT:
I added an entry in the wireless router routing table:
Destination LAN IP Subnet Mask Gateway Interface
0.0.0.0 255.255.255.0 x.x.x.x WAN (Internet)
0.0.0.0 0.0.0.0 x.x.x.1 WAN (Internet)
10.42.0.0 255.255.255.0 192.168.1.2 LAN & Wireless
x.x.x.0 255.255.252.0 x.x.x.x WAN (Internet)
192.168.1.0 255.255.255.0 192.168.1.1 LAN & Wireless
and that appears to have done the trick! it works now, thanks garethTheRed
sysctl net.ipv4.ip_forward
show?sysctl -w net.ipv4.ip_forward=1
as root and try again.