Install PiVPN - https://pivpn.io/
sudo -i
vi /etc/wireguard/wg0.conf
- Add
DNS = 10.6.0.1
(the wireguard IP of the Pi) - Add this to forward all traffic to the internet
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE