Thanks for the reply TinCanTech!
I had a good read of the link you posted and as far as I understood basically I need to make sure to NAT the VPN client traffic to the internet.
But then doing some further research (
for example see this Synology forum post) this should already be set up and looking at the output below it does look like to be the case:
$ sudo iptables -t nat -L
Chain PREROUTING (policy ACCEPT)
target prot opt source destination
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain POSTROUTING (policy ACCEPT)
target prot opt source destination
DEFAULT_POSTROUTING all -- anywhere anywhere
Chain DEFAULT_POSTROUTING (1 references)
target prot opt source destination
MASQUERADE all -- 172.18.0.0/24 anywhere
What I don't understand is that how it is possible that the whole setup works perfectly when I connect on my phone over 4G, but won't let me access anything either on the internet or even the VPN network when using Wifi.
Also, how come I can connect to my Synology box (the OpenVPN server) via SSH, but not to its web UI on the same IP (even though I'm using the VPN IP for both, so the route to the internet shouldn't matter)?
Is there anything else I can do to diagnose the issue?