I plan to host a Wireguard server on a Google Cloud VM (Ubuntu), which is then connected to my VPN provider (In this case, Mullvad). I do this so I can install a Pi-Hole instance aswell as an Unbound instance.
I can connect to the Wireguard server just fine once the interface is up. Everything works and traffic goes through smoothly. I did this with PiVPN.
However, when I connect to Mullvad through the CLI, I lose all access to the VM (which I expected), but I can't connect to the Wireguard server anymore. I have opened a port on the Mullvad page which is the same port as the Wireguard server (triple checked this) and I am using the IP of the Mullvad server as endpoint to connect to.
I have enabled the port to go through the firewall in the Google Cloud console aswell.
wg.conf:
[Interface]
PrivateKey = (hidden)
Address = 10.6.0.1/24
ListenPort = 59661
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o ens4 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o ens4 -j MASQUERADE
Can anyone help me figure it out? Thanks!