How do I state which network to use when trying to connect to something over a VPN?
For example: When I'm on 4G (and some other WiFi networks, but not all) and connected to my home network via OpenVPN and want to connect to something on my network thru 192.168.0.x, it'll connect fine. Be it in a web browser or SSH via Termux.
When I'm on my partner's internet, my phone will just try and connect to 192.168.0.x on their network and not the vpn.
Update: I found a few settings in the OpenVPN android app specifically for this!
Now to try and make OpenVPN on my laptop do the same. 😊
> How do I state which network to use when trying to connect to something over a VPN?
Short answer: you don't.
It's all defined by your routing table. If 192.168.0.0/24 is routed over wland0, you won't be able to access any 192.168.0.x IP over your VPN, and vice versa.
Routing is hard.
@wasbeer @0x16161D I gave up on easily SSHing from outside my network through standard routing and set up a Tor onion service to SSH into. There's some lag with keystrokes so don't expect it to be as fast, but I don't have to worry anymore about port forwarding or VPNs. It helps as anything networking seems to be my tech kryptonite.
Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.