Is there a way to automate the original default gateway?

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
maurertodd
OpenVpn Newbie
Posts: 1
Joined: Thu Dec 22, 2011 7:39 pm

Is there a way to automate the original default gateway?

Post by maurertodd » Thu Dec 22, 2011 7:46 pm

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?

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

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

Post by janjust » Thu Dec 22, 2011 11:21 pm

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.

Post Reply