Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm having a problem configuring OpenVPN server on Debian 5 32-bit and a client on Windows 7 64-bit.

I can connect from my windows client to the server successfully, but when I go to website that shows my IP address, I get my local IP address, and not my server's. What should I do to hide my local IP address?

Here is my server's config file:

port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
ifconfig-pool-persist ipp.txt
keepalive 10 120
user nobody
group users
status openvpn-status.log
verb 3

and here's config of windows client (downloaded from here

dev tun
proto udp
remote 1194
resolv-retry infinite
ca ca.crt
cert ferdo_key.crt
key ferdo_key.key
verb 3
share|improve this question

1 Answer 1

up vote 2 down vote accepted

You need to do this:

The specific server directive is:

push "redirect-gateway def1"

Basically, the server needs to push routing configuration to the client. This routing configuration will change the default route of the client, so that non-local traffic will go through the VPN tunnel rather than the LAN.

Note that you need to have OpenVPN client run with administrative privileges for this to work. Otherwise, the client program will not be able to change the Windows machine's routing table.

share|improve this answer
Thanks, that's it ! I don't know how I've missed that :) –  xx77aBs Feb 7 '12 at 12:19

Your Answer


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.