Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
    
Do post your OVPN client config file –  HackToHell Feb 6 '13 at 11:50
    
Shouldn't that be route del -net default gw 172.22.73.193? –  Paul Feb 6 '13 at 12:38

1 Answer 1

First, route is depreciated. Use ip route instead.

Second, remove:

push "redirect-gateway def1"

from your OpenVPN configuration file.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.