Wireguard on a DigitalOcean Droplet not allowing ssh, vnc, or smb
Sophia Terry
EDIT 3/15/22: Config info added at the end of this question I had a WireGuard VPN on a Google Cloud VPN but due to networking fees setup a new one on DigitalOcean. For some reason, I cannot SSH, VNC, or use SMB across any of the devices, but my public IP address seems to be working.
Is this a DigitalOcean related issue or any recommendations for troubleshooting?
This is an example of an error I get when trying to SSH into another device that is a peer to the DigitalOcean Ubuntu Droplet:
ssh: connect to host 10.0.0.5 port 22: Operation timed outwg0.conf on the DigitalOcean server:
[Interface]
Address = 10.0.0.1/24
SaveConfig = true
PostUp = ufw route allow in on wg0 out on eth0
PostUp = iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE
PostUp = ip6tables -t nat -I POSTROUTING -o eth0 -j MASQUERADE
PreDown = ufw route delete allow in on wg0 out on eth0
PreDown = iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
PreDown = ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
ListenPort = 51820
PrivateKey = eHXOyd8**REMOVED FOR SECURITY**xMO9mlc=
[Peer]
PublicKey = wk6iHe+FiJhIV+wLxeCVLyWdT/WV8xrLmeHI39m5v2o=
AllowedIPs = 10.0.0.2/32
Endpoint = 104.228.167.16:51820
[Peer]
PublicKey = /OEck40Kjc15a3JzePkf9wmlMw+Sdzgaauhfzt/3LkM=
AllowedIPs = 10.0.0.3/32
Endpoint = 104.228.167.16:55239
[Peer]
PublicKey = CgHsJnocl8CkpD0c4rqFPmOBbpNB8Wpx0hy6J0YhBj0=
AllowedIPs = 10.0.0.4/32
Endpoint = 104.228.167.16:59555
[Peer]
PublicKey = wxW/6x/M8msXWqahcAR7OjpZbXsZta18qMHGMvbKaRg=
AllowedIPs = 10.0.0.5/32
Endpoint = 104.228.167.16:52628
PersistentKeepalive = 25Result of running sudo ufw status:
root@wireguard:~# sudo ufw status
Status: active
To Action From
-- ------ ----
51820/udp ALLOW Anywhere
OpenSSH ALLOW Anywhere
51820/udp (v6) ALLOW Anywhere (v6)
OpenSSH (v6) ALLOW Anywhere (v6)
Anywhere on eth0 ALLOW FWD Anywhere on wg0
Anywhere (v6) on eth0 ALLOW FWD Anywhere (v6) on wg0My iMac Config (trying to SSH, VNC, and SMB into the raspberry pi):Screenshot of the App Dashboard
And Raspberry Pi (network server) wg0.conf file:
[Interface]
PrivateKey = 0B26+xT9D4ZxOD23IeOPvh7gApOL5ES5NdXES/l7Lkk=
Address = 10.0.0.5
[Peer]
PublicKey = uj4QIUv4k40HK0nCGAtPKx8BYLUtWK8cTvLGOADkzx4=
AllowedIPs = 0.0.0.0/0
Endpoint = 142.93.113.242:51820
PersistentKeepalive = 25And a screenshot of my DigitalOcean Dashboard:DigitalOcean VM Dashboard
61 Answer
Thanks to a user in the comments, allowing the firewall to route traffic through the VPN interface fixed the issue.
0