OpenVPN DNS: VPN DNS stomping local VPN

2

I've finally noodled with OpenVPN enough to get it working. Even better, I can mount samba drives, ping network machines through the TUN device, etc - it's all great.

However, I'm noticing that if I use the following directive, then some of the machines that are normally visible by the client, on the client's side (i.e., not through the VPN) get masked with some other server out on the Internet.

push "dhcp-option DNS 10.0.1.1" # Push our local DNS to clients

Is there any way to avoid this, besides hacking the 'hosts' file on the client machine? Ideally I'd like to only use my VPN's DNS for machines within that domain.

Eddie Parker

Posted 2010-03-23T17:35:52.850

Reputation: 2 074

Are those machines are different subnets? Is there anything that differentiates them from the machines that can be reached? – heavyd – 2010-03-23T18:58:50.107

I'm confused as to which machines you're referring to.

The machine I'm trying to reach is in my LAN subnet. The one I'm reaching when I'm connected to my VPN is out in the Internet somewhere - totally different IP. If that's what you mean, then yes - they're on different subnets. – Eddie Parker – 2010-03-26T01:23:52.440

Answers

2

If it only affects XP and Win 2000 machines, it might be the problem discussed in KB 311218.

A client computer may not use the DNS server from a VPN connection if the default gateway is set to the remote connection.

Fred

Posted 2010-03-23T17:35:52.850

Reputation: 1 205

Hrmm, good link. Unfortunately it's a Vista box. Reordering the VPN interface to be lower priority than the normal one works, but then anything in my home domain gets resolved using 'normal' DNS versus using my domain's dns. I'm not sure how to fix this. – Eddie Parker – 2010-04-07T22:46:11.413