I run several services in a linux guest running on vmware on a windows host. Inside the linux guest, I connect the wireguard client to my vpn provider using the following config:
[Interface]
PrivateKey = Redacted
Address = 100.81.66.38/32
DNS = 10.255.255.1
[Peer]
PublicKey = Redacted
AllowedIPs = 0.0.0.0/0
Endpoint = den-301-wg.whiskergalaxy.com:443
PresharedKey = Redacted
On my router, I run a DDNS client so that I always have a friendly name to connect to my services over the web, and I then use port forwards to access my various services (ssh, ftp, etc).
Before connecting my wireguard client, I can access these services from across the internet just fine, but after I wg-quick up wg0
inside my linux guest, I can no longer reach the services from the internet. I am able to still reach them using the local ip address of my linux guest (from the local lan). I just can't seem reach them using the routers public address across the internet.
This seems weird, because I would have though that if I can access things like the ssh server from my local lan, then I though the port forward from the router would have worked as well, since it's pointing to the exact same local ip address. Interestingly enough, I have a similar setup running in another guest except its running Windows. On that one, I can connect the wireguard client, and I can still reach the web services running on that guest through the router's public ip and port forwarding just fine. It's only the linux guest that is doing something different.
I've done things like sysctl -w net.ipv4.ip_forward=1
but it doesn't seem to help. I've also tried AllowedIPs = 0.0.0.0/1, 128.0.0.0/1
but that doesn't change anything either. I can always access them locally, but not over internet. As soon as I disconnect wireguard, everything starts working again.