[Solved] Unable to connect to servers hostname

Need help configuring your VPN? Just post here and you'll get that help.

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.
Locked
kasper
OpenVpn Newbie
Posts: 4
Joined: Sat Jun 18, 2011 11:00 pm

[Solved] Unable to connect to servers hostname

Post by kasper » Sat Jun 18, 2011 11:16 pm

I recently installed an openvpn network using the tutorials found on this site, however I seem to have an issue that I'm having trouble solving. I am a completely new to administering a server, so the problem could be an obvious one that I am missing.

I'm using the standard configs that come with the openvpn windows installer for both the server and the clients, but here they are for easy reference:
server:

Code: Select all

port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key  # This file should be kept secret
dh dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3
client:

Code: Select all

client
dev tun
proto udp
remote my-server-1 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
ns-cert-type server
comp-lzo
verb 3
Obviously I changed some of the locations such as IP and file locations back to default when posting the configs here.

I am able to connect without any problems, I can ping the server using the ip address 10.8.0.1 and even connect and browse the shared files using that ip.
The problem is that I cannot connect to the server using it's hostname. For instance, lets say the servers name is server1, I cannot successfully ping server1 and connecting to \\server1 also does not work.

The server is running Windows Server 2008, and the clients are running Windows 7 (I've tested on both 32 and 64 bit flavors).

Any help would be greatly appreciated.
Last edited by kasper on Mon Jun 20, 2011 8:48 pm, edited 1 time in total.

kasper
OpenVpn Newbie
Posts: 4
Joined: Sat Jun 18, 2011 11:00 pm

Re: Unable to connect to servers hostname

Post by kasper » Sun Jun 19, 2011 6:28 am

Seems the problem also occurs when the client is running Windows XP.

User avatar
Bebop
Forum Team
Posts: 301
Joined: Wed Dec 15, 2010 9:24 pm

Re: Unable to connect to servers hostname

Post by Bebop » Sun Jun 19, 2011 8:18 am

Did you follow 1 of these 2 guides: examples-f7.html
?
If so, those guides don't solve the problem of Windows DNS sharing (you can see they rely on Google DNS). Maybe the problem extends to Windows Name Server too, and hence your problem.

I've been on the lookout for a solution for a while now with nothing concrete.

I don't have enough first hand experience with with the Windows VPN environment to help you solve this one just yet. Await for one of the experts now.
The cure for boredom is curiosity

kasper
OpenVpn Newbie
Posts: 4
Joined: Sat Jun 18, 2011 11:00 pm

Re: Unable to connect to servers hostname

Post by kasper » Sun Jun 19, 2011 6:32 pm

I actually used this guide on the main page: http://www.openvpn.net/index.php/open-s ... howto.html

I'll take a look through the ones you posted and see if they do anything different that might help.

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: Unable to connect to servers hostname

Post by janjust » Mon Jun 20, 2011 10:34 am

if network browsing via IP works , but not using the windows names then you need to set up or add a WINS server; if you have a WINS server on your LAN, which is reachable via the VPN (try pinging the IP address of the VPN server) then add

Code: Select all

push "dhcp-option WINS X.X.X.X"
to the server config; after that, the VPN client shoud pick up the WINS server and you should be able to do a

Code: Select all

nbtstat <name>
in a command console window on the VPN client.

kasper
OpenVpn Newbie
Posts: 4
Joined: Sat Jun 18, 2011 11:00 pm

Re: Unable to connect to servers hostname

Post by kasper » Mon Jun 20, 2011 8:48 pm

I got it working. Thanks a ton for the help on the WINS server, thats exactly what I needed. Like I said, I'm new to being a server admin and never would of thought of that.

Here's everything I ended up doing in case it helps someone else. I changed the VPN network on the server from public to private (don't know if this helped, but figured it wouldn't hurt), enabled WINS on the server, and added

Code: Select all

push "dhcp-option WINS 10.8.0.1"
to the server config file.

Thanks again for the help.

Locked