[Solved] Routing 192.168.0.x traffic through VPN
Posted: Fri Jun 10, 2016 5:49 pm
Hello,
I have the latest ovpn server (standard, not access server) running.
I can connect to it just fine, and route all traffic through it just fine. Everything works perfectly, with one exception. When I'm connected to the VPN from the office wifi which uses the 192.168.0.x subnet, and I try to access a machine on the VPN network that also uses the 192.168.0.x subnet, the VPN client ALWAYS tries to connect to the local network, instead of the network on the VPN side.
I've confirmed that if I switch to a non-wifi network (ex: 4G) I get a different IP/gateway on the phone and since it's not on the 192.168.0.x network I can connect fine to it on the VPN network, so it does work, but only when the networks are not the same.
So my question is... On the client side (config file) is it possible to add some configuration that will force all traffic, including the 192.168.0.x traffic through the VPN, instead of routing the 192.168.0.x traffic through the local router? I already added redirect-gateway local def1 but it doesn't seem to fix the problem.
I have the latest ovpn server (standard, not access server) running.
I can connect to it just fine, and route all traffic through it just fine. Everything works perfectly, with one exception. When I'm connected to the VPN from the office wifi which uses the 192.168.0.x subnet, and I try to access a machine on the VPN network that also uses the 192.168.0.x subnet, the VPN client ALWAYS tries to connect to the local network, instead of the network on the VPN side.
I've confirmed that if I switch to a non-wifi network (ex: 4G) I get a different IP/gateway on the phone and since it's not on the 192.168.0.x network I can connect fine to it on the VPN network, so it does work, but only when the networks are not the same.
So my question is... On the client side (config file) is it possible to add some configuration that will force all traffic, including the 192.168.0.x traffic through the VPN, instead of routing the 192.168.0.x traffic through the local router? I already added redirect-gateway local def1 but it doesn't seem to fix the problem.