...
Mutual ping on both devices: ping 192.168.0.42 (or 8)/ ping 192.268.0.8
On the pi:
- Add route: sudo ip route add default via 192.168.0.42
- nano /etc/systemd/resolved.conf
under "[Resolve]" make sure it reads:
DNS=1.1.1.1 8.8.8.8 service systemd-resolved restart
On the gateway computer:
- Use iptable to do the forwarding:sudo iptables -A FORWARD -o wlo1 -i enx00e04c680dc9 -s 192.168.0.0/255.255.255.0 -m conntrack --ctstate NEW -j ACCEPT (wlo1 is the network interface with internet access)
sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -t nat -F POSTROUTING
sudo iptables -t nat -A POSTROUTING -o wlo1 -j MASQUERADE