I can do everything except use the internet when using wireguard...
-
I've just set up WireGuard on Ubuntu Server 21.1 on a Raspberry Pi 4 and on my Macbook. Everything works fine and I can tunnel into my network while on a mobile hotspot and ssh into the server, access samba shares etc, but the internet doesn't work. Any help would be greatly appreciated! I really am no expert with networking... Here is my configuration:
wg0.conf
Address = 10.0.0.1/24 SaveConfig = true PreUp = iptables -t nat -A POSTROUTING -j MASQUERADE -o eth0 PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCE> PreDown = iptables -t nat -D POSTROUTING -j MASQUERADE -o eth0 PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j AC> ListenPort = 51820 PrivateKey = *** [Peer] PublicKey = *** AllowedIPs = 10.14.0.10/32 Endpoint = 1.146.37.1:1091
Macbook config
PrivateKey = *** Address = 10.14.0.10/32 DNS = 10.42.0.1 [Peer] PublicKey = *** AllowedIPs = 0.0.0.0/0, ::/0 Endpoint = 27.253.9.52:51820
sysctl.conf
net.ipv4.ip_forward=1 net.ipv6.conf.all.forwarding=1
Thank you for your help!
Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.