I've recently setup my StrongSwan VPN, mostly following this DigitalOcean guide. It worked nicely until I encountered this weird routing issue.
Network diagram below:
+-----------+ +-----------+ Internet +------------+ +-------------+
|VPN server |___|Router |. . . . . |WiFi gateway|___|Laptop |
|192.168.0.2| |192.168.0.1| |192.168.0.1 | |192.168.0.111|
+-----------+ +-----------+ +------------+ +-------------+
Basically I'm loosing access to my LAN when I'm connecting to a Wi-Fi that has the same IP address (or same network) as my router. When I try to connect to 192.168.0.XXX
my laptop tries to access a host behind the Wi-Fi router network, rather than the VPN server's network.
I'm suspecing it's a routing issue on the client, but there's not much I can do when I connect from iOS for example.
Is there a server setting that can prevent this behaviour?