Problem resolving hostnames

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
rpr
OpenVpn Newbie
Posts: 5
Joined: Thu Oct 07, 2010 11:58 am

Problem resolving hostnames

Post by rpr » Thu Oct 07, 2010 12:04 pm

I've setup a TUN VPN connection to be used for clients to access LAN ressources securely while outside the LAN. I can ping all my servers just fine, but the windows hostname resolving is not working :(

The target LAN is running on Domain1
Clients on Domain2 (at home atm, and company laptop at work, yay..)

Whenver I ping an IP address, i get a reply and everything is peachy!
When i ping the hostname of something on Domain1, it appears to be trying to resolve the hostname on Domain2.
I'll give it a go from a PC enrolled on Domain1 tomorrow morning to see if it just needs to be enrolled or whatever, anyone else got suggestions?

User avatar
krzee
Forum Team
Posts: 728
Joined: Fri Aug 29, 2008 5:42 pm

Re: Problem resolving hostnames

Post by krzee » Thu Oct 07, 2010 12:11 pm

you need a WINS server. you can then push it to windows clients like this
in server config
push "dhcp-option WINS a.b.c.d"

rpr
OpenVpn Newbie
Posts: 5
Joined: Thu Oct 07, 2010 11:58 am

Re: Problem resolving hostnames

Post by rpr » Fri Oct 08, 2010 3:44 am

Great, this ALMOST fixed the problem!
I can resolve real hostnames just fine now, added the WINS entry in the DHCP server and they'll get it pushed eventually over the weekend, BUT cname aliases still dont work.
I've had a go at modifying the windows registry for adding multiple NetBIOS names, apparantly that used to work, but dont seem to have any effect now.

More ideas? Any help is greatly appreciated! :)

User avatar
krzee
Forum Team
Posts: 728
Joined: Fri Aug 29, 2008 5:42 pm

Re: Problem resolving hostnames

Post by krzee » Fri Oct 08, 2010 11:30 pm

WINS has cname entries too? (i dont use wins/samba/windows)
you might mean DNS now... if so, you can also push DNS servers that way

rpr
OpenVpn Newbie
Posts: 5
Joined: Thu Oct 07, 2010 11:58 am

Re: Problem resolving hostnames

Post by rpr » Sat Oct 09, 2010 8:32 am

It's DNS cname entries alright, but doesn't seem like DNS lookups are traversing the tunnel, even though I'm pushing the DNS servers :(

User avatar
krzee
Forum Team
Posts: 728
Joined: Fri Aug 29, 2008 5:42 pm

Re: Problem resolving hostnames

Post by krzee » Sun Oct 10, 2010 12:31 pm

if you have done nothing in your routing to make it traverse the tunnel, it shouldnt...
if you are using a nameserver 8.8.8.8 try this:
push "route 8.8.8.8 255.255.255.255"

That will make the single IP 8.8.8.8 be reached by clients over the tunnel.

rpr
OpenVpn Newbie
Posts: 5
Joined: Thu Oct 07, 2010 11:58 am

Re: Problem resolving hostnames

Post by rpr » Sun Oct 10, 2010 12:45 pm

I can ping the DNS server just fine already and push it into the network config of the clients, but it still appears to prefer the local DNS servers over the remote ones :/
Any hostname on the destination LAN wont resolve, but pinging their IP works just fine.
WINS sorta fixed it, pushing hostname lookups to the clients, but CNAME aliases configured in the DNS servers on the destination LAN still dont work.

User avatar
krzee
Forum Team
Posts: 728
Joined: Fri Aug 29, 2008 5:42 pm

Re: Problem resolving hostnames

Post by krzee » Sun Oct 10, 2010 3:50 pm


rpr
OpenVpn Newbie
Posts: 5
Joined: Thu Oct 07, 2010 11:58 am

Re: Problem resolving hostnames

Post by rpr » Mon Oct 11, 2010 6:48 am

Problem fixed, I needed to push the domain name through the VPN aswell (d0h) :)
Thanks for the effort tho!

Post Reply