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

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 am connected to an OpenVPN server that is configured with the options to redirect the VPN as the default gateway and to push my internal DNS servers:

push "dhcp-option DNS"
push "redirect-gateway def1"

When I do an:

ipconfig /all

I see my DNS server in the list. I can also ping successfully.

My problem is that when I try to ping somesite.internal.dom I'm not getting a result from my internal DNS server. I'm getting the result from OpenDNS (which is handling my non-VPN DNS traffic) telling me the site doesn't exist.

If I ping somesite.internal.dom from a machine that's directly connected to the network (i.e. not VPN'd in), it resolves properly.

How can I get my OpenVPN connection to try the VPN DNS server first? Or to ignore the local DNS traffic all together?

share|improve this question
up vote 10 down vote accepted

The binding order of your network interfaces determines the order Windows will access DNS servers. You don't specify the version of Windows you're using. In Windows XP the "Advanced Settings..." dialog in the "Network Connections" dialog will allow you to change the binding order. It's in the same place in Windows 7, however the nomenclature has changed slightly in regards to getting to the "Network Connections" dialog. (I generally just run ncpa.cpl to get there in Windows 7 anyway...)

Put the OpenVPN "NIC" at the top of the list in the "Connections" list and its DNS servers will be queried first.

share|improve this answer
Thanks so much! – omghai2u Jul 10 '12 at 23:45
I had already had the VPN connection on top of the list and still Windows uses another connection's DNS... – Kolyunya Mar 5 at 23:05

In Windows 7, after opening ncpa.cpl you need to tap 'Alt' to get the menu to appear. Then go to Advanced -> Advanced Settings... to get the dialog where you can edit the binding order.

share|improve this answer
You can also turn on the menu permantely by going to Organize -> Layout -> Menu bar: – MLM Jan 14 at 17:56

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.