Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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         UG    0      0        0 wlan0     *        U     0      0        0 wlan0

After enabling VPN:

default       UG    0      0        0 tun0
default         UG    0      0        0 wlan0
static-78-8-9-5 UGH   0      0        0 wlan0   *      U     0      0        0 tun0     *        U     0      0        0 wlan0

I tried to delete first route with command sudo route del default gw, 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 – Paul Feb 6 '13 at 12:38

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.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .