I'm using a Raspberry PI to share it's wifi connection with an ethernet-switch. In the Connection Manager, I set the eth0-interface to shared, so it would use the wlan0-interface as the internet connection.
Internet access from the ethernet works, but I am not able to access any of the workstations in the ethernet from the wifi, even though I set a static route on the router which routes the wifi-network.
This is my setup:
Wifi network: 192.168.178.0/24, the Raspberry has the static address 192.168.178.251
Ethernet network: 10.42.0.0/24, the Raspberry is the router here with 10.42.0.1
ethernet -> wifi works without any problems
wifi -> ethernet is like this:
$ ping 10.42.0.83 PING 10.42.0.83 (10.42.0.83) 56(84) bytes of data. From 192.168.178.1: icmp_seq=1 Redirect Host(New nexthop: 192.168.178.251) From 192.168.178.1 icmp_seq=1 Redirect HostFrom 192.168.178.251 icmp_seq=1 Destination Port Unreachable From 192.168.178.251 icmp_seq=2 Destination Port Unreachable From 192.168.178.251 icmp_seq=3 Destination Port Unreachable From 192.168.178.251 icmp_seq=4 Destination Port Unreachable ^C --- 10.42.0.83 ping statistics --- 4 packets transmitted, 0 received, +5 errors, 100% packet loss, time 3003ms
except for the Raspberry itself:
$ ping 10.42.0.1 PING 10.42.0.1 (10.42.0.1) 56(84) bytes of data. From 192.168.178.1: icmp_seq=1 Redirect Host(New nexthop: 192.168.178.251) From 192.168.178.1 icmp_seq=1 Redirect Host64 bytes from 10.42.0.1: icmp_req=1 ttl=64 time=44.8 ms 64 bytes from 10.42.0.1: icmp_req=2 ttl=64 time=269 ms 64 bytes from 10.42.0.1: icmp_req=3 ttl=64 time=88.6 ms 64 bytes from 10.42.0.1: icmp_req=4 ttl=64 time=111 ms [...] ^C --- 10.42.0.1 ping statistics --- 10 packets transmitted, 10 received, +1 errors, 0% packet loss, time 9010ms rtt min/avg/max/mdev = 19.821/84.037/269.677/68.191 ms
I took a look into the routing table of the raspi, since the problem seems to lie there:
$ route -n Kernel-IP-Routingtable Target Router Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.178.1 0.0.0.0 UG 0 0 0 wlan0 10.42.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 192.168.178.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
$ ip route show default via 192.168.178.1 dev wlan0 10.42.0.0/24 dev eth0 scope link 192.168.178.0/24 dev wlan0 proto kernel scope link src 192.168.178.251
I think the problem is, that the scope of the route to the ethernet is 'link', but as much as I looked into the manpages and at examples, I wasn't able to change that to 'global'.
I want to be able to set up a NAS or another server of some kind in the ethernet-network so it really bothers me that it isn't accessible from the wifi.
I have full access to the raspi via ssh and vnc.
Edit: Solved, just had to flush the iptables, the packets somehow got filtered out...