This system has a webserver with some pages which allows data retrieval and configuration, which needs to be accessible to the internal network without WiFi.
The idea is the following:
- RPi3 connected by wire to main network
- RPi3 WiFi connected to the data system WiFi SSID
- RPi3 set up as a router by editing the /etc/sysctl.conf and enabling packet forwarding:
Code: Select all
# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1
Code: Select all
route -4 ADD 1.2.3.0 MASK 255.255.255.0 10.0.0.69
This is what I have on the RPi3:
Code: Select all
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.0.1 0.0.0.0 UG 202 0 0 eth0
0.0.0.0 1.2.3.4 0.0.0.0 UG 303 0 0 wlan0
1.0.0.0 0.0.0.0 255.0.0.0 U 303 0 0 wlan0
10.0.0.0 0.0.0.0 255.255.255.0 U 202 0 0 eth0
ifconfig
eth0 Link encap:Ethernet HWaddr b8:27:eb:e2:6b:1f
inet addr:10.0.0.69 Bcast:10.0.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3061 errors:0 dropped:0 overruns:0 frame:0
TX packets:392 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:241857 (236.1 KiB) TX bytes:54700 (53.4 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:76 errors:0 dropped:0 overruns:0 frame:0
TX packets:76 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:6488 (6.3 KiB) TX bytes:6488 (6.3 KiB)
wlan0 Link encap:Ethernet HWaddr b8:27:eb:b7:3e:4a
inet addr:1.2.3.6 Bcast:1.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:282 errors:0 dropped:271 overruns:0 frame:0
TX packets:90 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:92971 (90.7 KiB) TX bytes:15276 (14.9 KiB)
ping 1.2.3.4
PING 1.2.3.4 (1.2.3.4) 56(84) bytes of data.
64 bytes from 1.2.3.4: icmp_seq=1 ttl=64 time=5.11 ms
64 bytes from 1.2.3.4: icmp_seq=2 ttl=64 time=4.91 ms
Here is the Win7 state:
Code: Select all
route print
...
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 10.0.0.1 10.0.0.66 10
1.2.3.0 255.255.255.240 10.0.0.69 10.0.0.66 11
10.0.0.0 255.255.255.0 On-link 10.0.0.66 266
10.0.0.66 255.255.255.255 On-link 10.0.0.66 266
10.0.0.255 255.255.255.255 On-link 10.0.0.66 266
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
...
ping 1.2.3.4
Pinging 1.2.3.4 with 32 bytes of data:
Request timed out.
tracert 1.2.3.4
Tracing route to 1.2.3.4 over a maximum of 30 hops
1 <1 ms <1 ms <1 ms rpi3-jessie.xxxx.com [10.0.0.69]
2 * * * Request timed out.
3 * * * Request timed out.
And when I try to reach the system's webpage I get a timeout error in FireFox.
But the tracert command seems to indicate that I reach the RPi3 (10.0.0.69)
So what have I done wrong on the Pi?