OpenVPN overrides gateways

1

I have problem with OpenVPN on Linux, because it overrides my gateways, so all network traffic goes through VPN tunnel. I want to push through tunnel only traffic from specific subnet. My routes without OpenVPN running:

default         192.168.0.1     0.0.0.0         UG    0      0        0 wlan0
192.168.0.0     *               255.255.255.0   U     0      0        0 wlan0

After enabling VPN:

default         172.22.73.193   128.0.0.0       UG    0      0        0 tun0
default         192.168.0.1     0.0.0.0         UG    0      0        0 wlan0
static-78-8-9-5 192.168.0.1     255.255.255.255 UGH   0      0        0 wlan0
172.22.73.192   *               255.255.255.192 U     0      0        0 tun0
192.168.0.0     *               255.255.255.0   U     0      0        0 wlan0

I tried to delete first route with command sudo route del default gw 172.22.73.193, but it always fails with SIOCDELRT: No such process.

Can I achieve that by changing OpenVPN

Goofy

Posted 2013-02-06T11:30:37.027

Reputation: 161

Do post your OVPN client config file – HackToHell – 2013-02-06T11:50:41.130

Shouldn't that be route del -net default gw 172.22.73.193? – Paul – 2013-02-06T12:38:40.680

Answers

1

The server you are connecting to is probably an Online VPN Service Provider, which uses push "redirect-gateway" to send ALL your client data over the VPN. To stop this you can add route-nopull to your client config file.

dotvotdot

Posted 2013-02-06T11:30:37.027

Reputation: 496