I have installed an OpenVPN server + client, the server is windows xp and the client is slackware 12 linux. I set up the first tunnel, test it, ping the machines from each side and saw it's working.

Now I am trying to route the internet traffic (+Web browsing) through the VPN tunnel, so I did just like in the OpenVPN howto, but it doesn't seem to work.

I tried push redirect-gateway/redirect-gateway def1 etc. etc. but it doesn't route the traffic through the server.

Here is the server's config:

remote xxx
dev tun
tun-mtu 1500
secret key.txt
ping 10
verb 4
mute 10
push "redirect-gateway def1"

In the howto there is: " The server will need to be configured to deal with this traffic somehow, such as by NATing it to the internet, or routing it through the server site's HTTP proxy." - Is this the problem ? Or it is sommething with the routings (i don't know nothing about adding routes and their usage). Please help me somehow.

Thank you.


I am afraid you will need to do some reading on IP routing. A good starting point could be here. Now to your specific problem: you need to replace the "def1" with the address of your IP tunnel, so that all traffic is by default routed into the tunnel.

However, please note that this will route really ALL traffic through the tunnel. If you want to only route traffic for specific target networks through the tunnel you will need lines similar to this:

push "route"

In this example, stands for the network address of the subnet, and stands for the subnet mask. If you don't know what these terms mean, then you should start reading.

  • Thank you for your asnwer! However, what do you mean with address of the IP tunnel ? The server's ip or (ifconfig) ? – piro Aug 26 '09 at 16:34
  • In your example, it would have to be, as this is the remote tunnel endpoint, through which all traffic needs to go. – wolfgangsz Aug 26 '09 at 16:53

Turn on ipenablerouter in the registry to enable Windows XP to route between interfaces


  • And what will do NAT? – Gleb Sep 25 '09 at 18:06

Yes, you need to set up NAT or proxy. Internet Connection Sharing could be used but note that it will require configuring a specific address ( on your TAP virtual adapter.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy