I need OpenVPN client on Android to not route through the VPN when the phone is connected to a specific Wifi network
Posted: Wed Apr 14, 2021 3:21 pm
Hi
I have a home server running several services in my local network. Some of them are accessible from the internet, through a reverse proxy and they have their own domain, for example nextcloud.example.com. I have an override in my LAN DNS server, so when a computer in the local network tries to connect to nextcloud.example.com, it receives the internal LAN IP of the reverse proxy, instead of the Internet IP of the domain.
But my Android phone has an always on VPN connection, so it bypasses my LAN DNS server. What I would like is for the OpenVPN in my Android phone to not route certain domains through the VPN but only when the phone is connected to my home Wifi. Is this even possible to do with OpenVPN (or other VPN software for Android)? If yes, an explanation of how or link to some releveant docs would be appreciated. If not, is there a better way to organize this set up?
I have a home server running several services in my local network. Some of them are accessible from the internet, through a reverse proxy and they have their own domain, for example nextcloud.example.com. I have an override in my LAN DNS server, so when a computer in the local network tries to connect to nextcloud.example.com, it receives the internal LAN IP of the reverse proxy, instead of the Internet IP of the domain.
But my Android phone has an always on VPN connection, so it bypasses my LAN DNS server. What I would like is for the OpenVPN in my Android phone to not route certain domains through the VPN but only when the phone is connected to my home Wifi. Is this even possible to do with OpenVPN (or other VPN software for Android)? If yes, an explanation of how or link to some releveant docs would be appreciated. If not, is there a better way to organize this set up?