Page 1 of 1

Is there a way to automate the original default gateway?

Posted: Thu Dec 22, 2011 7:46 pm
by maurertodd
I have a successful OpenVPN connection. But when it is connected all internet traffic flows through the OpenVPN tunnel which is very slow.

I can manually fix this on Windows with CMD prompt>

C:/> route change 0.0.0.0 192.168.0.1 mask 0.0.0.0

Once that is done all connections behave the way I want.

Is there a way to avoid the OpenVPN client from changing the default gateway, or to automate putting the default gateway back immediately after the connection is complete?

Re: Is there a way to automate the original default gateway?

Posted: Thu Dec 22, 2011 11:21 pm
by janjust
the default gateway is redirected because either the server uses
push "redirect-gateway def1"
or because the client config contains
redirect-gateway def1
If you don't control the server then you can overrule the server behaviour by adding

Code: Select all

route-nopull
to the client config file - this will skip ALL routes pushed by the VPN server.