Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # sudo route -n
- Kernel IP routing table
- Destination Gateway Genmask Flags Metric Ref Use Iface
- 0.0.0.0 192.168.8.1 0.0.0.0 UG 0 0 0 wlan0
- 0.0.0.0 192.168.8.1 0.0.0.0 UG 303 0 0 wlan0
- 169.254.0.0 0.0.0.0 255.255.0.0 U 202 0 0 eth0
- 192.168.0.0 0.0.0.0 255.255.0.0 U 0 0 0 wlan0
- 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
- 192.168.8.0 0.0.0.0 255.255.255.0 U 303 0 0 wlan0
- # sudo iptables -L
- Chain INPUT (policy ACCEPT)
- target prot opt source destination
- Chain FORWARD (policy ACCEPT)
- target prot opt source destination
- ACCEPT all -- anywhere anywhere state NEW,RELATED,ESTABLISHED
- ACCEPT all -- anywhere anywhere state NEW,RELATED,ESTABLISHED
- Chain OUTPUT (policy ACCEPT)
- target prot opt source destination
- # /etc/network/interfaces
- # interfaces(5) file used by ifup(8) and ifdown(8)
- # Please note that this file is written to be used with dhcpcd
- # For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
- # Include files from /etc/network/interfaces.d:
- source-directory /etc/network/interfaces.d
- auto lo
- iface lo inet loopback
- allow-hotplug wlan0
- iface wlan0 inet static
- address 192.168.8.254
- netmask 255.255.0.0
- gateway 192.168.8.1
- network 192.168.8.0
- broadcast 192.168.8.255
- metric 0
- post-up route add default gw 192.168.8.1 metric 0
- pre-down route del default gw 192.168.8.1
- wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
- allow-hotplug eth0
- iface eth0 inet static
- address 192.168.1.254
- gateway 192.168.8.254
- netmask 255.255.255.0
- network 192.168.1.0
- broadcast 192.168.1.255
- metric 1
- post-up route add default gw 192.168.8.254 metric 1
- pre-down route del default gw 192.168.8.254
- ------------
- Real router
- ------------
- Real router subnet = 192.168.8.0/24
- Pi ip on actual router (wlan0) = 192.168.8.254
- ------------
- Pi router
- ------------
- Pi router subnet (eth0) 192.168.1.0/24 - forward traffic to 192.168.8.254 (wlan0)
- pi router ip (eth0) 192.168.1.254
- my pc 192.168.1.245
- ---------------------------------------------------------------------------
- from pi router - I can ping:
- google 8.8.8.8
- my pc 192.168.1.245
- actual router 192.168.8.1
- from my pc - I can ping
- pi router 192.168.1.254
- over actual router wifi, I can ping pi router aswel
- ------------------------------------------------------
- Problem: Pi is not forwarding traffic between interfaces or simply forwarding traffic
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement