I have a local network on 192.168.1.0 with netmask 255.255.255.0. When I connect to a VPN though OpenVPN (as a client), it pushes a route for 192.168.1.0 that clobbers the existing one, making my local network inaccessible. I don't to access anything on 192.168.1.0 on the remote machine; I'd like to just ignore it, while accepting the other routes that are pushed. My client is Ubuntu 10.10.
How can I skip the one offending route?
Best Answer
Use the
option in openvpn and completely ignore the routes being pushed to you, instead adding static routes to the specific hosts you want to access through the tunnel.
where /tmp/myscript is
Something similar to that, I haven't actually tested this but it should work. You probably want to remove the routes when you disconnected as well.