It is currently 24.11.2017 09:17


All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Cannot access with hostname of local domain (just by IP)
PostPosted: 09.10.2012 18:24 
DES
DES

Joined: 09.10.2012 17:53
Posts: 3
I have a OpenVPN server (running on Windows Server 2008) with internal IP 192.168.0.2
I can connect very well from remote client. I can ping local network clients when I use IPs, connect to webserver using the IP, do
Code:
"host xxx.local"
and get
Code:
xxx.local has address 192.168.0.2
back.
But when I try to ping "xxx.local" or browse to "xxx.local" the hostname is not resolved (timeout, unknown host).

We have another Windows Server running as DHCP, DNS, IIS, Exchange machine that acts as router to the internet. (IP 192.168.0.2)

Below are my configuation files. Any ideas?

Server-Config:
Code:
port 1194
proto tcp
dev tap
dev-node MyTap
ca "C:\\Program Files (x86)\\OpenVPN\\server-keys\\ca.crt"
cert "C:\\Program Files (x86)\\OpenVPN\\server-keys\\server2.crt"
key "C:\\Program Files (x86)\\OpenVPN\\server-keys\\server2.key"  # This file should be kept secret
dh "C:\\Program Files (x86)\\OpenVPN\\server-keys\\dh1024.pem"
ifconfig-pool-persist "C:\\Program Files (x86)\\OpenVPN\\server-keys\\ipp.txt"

server-bridge 192.168.0.9 255.255.255.0 192.168.0.150 192.168.0.249
server-bridge
push "dhcp-option DOMAIN local"
client-to-client

keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3


Client-Config:
Code:
remote x.x.x.x 1194 #external IP address

ca ca.crt
cert client.crt
key client.key

client
dev tap
proto tcp
resolv-retry infinite
nobind
persist-key

comp-lzo
verb 3


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Cannot access with hostname of local domain (just by IP)
PostPosted: 10.10.2012 16:53 
DES
DES

Joined: 09.10.2012 17:53
Posts: 3
Tested this with Routing-Mode, but still the same issue. "host" and "nslookup" solve the xxx.local to the right IP (192.168.0.2), but when I do "ping xxx.local" there will be the error "ping: cannot resolve xxx.local: unknown host"

I added the right routes and so on to IP tables, ping from 192.168.0.0 to 10.8.1.0 and vice versa works just fine.


server.conf:
Code:
port 1194
proto tcp
dev tun
dev-node MyTap
ca "C:\\Program Files (x86)\\OpenVPN\\server-keys\\ca.crt"
cert "C:\\Program Files (x86)\\OpenVPN\\server-keys\\server2.crt"
key "C:\\Program Files (x86)\\OpenVPN\\server-keys\\server2.key"  # This file should be kept secret
dh "C:\\Program Files (x86)\\OpenVPN\\server-keys\\dh1024.pem"
ifconfig-pool-persist "C:\\Program Files (x86)\\OpenVPN\\server-keys\\ipp.txt"

server 10.8.1.0 255.255.255.0
push "route 192.168.0.0 255.255.255.0"
push "dhcp-option DNS 192.168.0.2"
; push "dhcp-option DOMAIN xxx.local"  # tried with and without this, no effect
client-to-client

keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3


client.conf:
Code:
remote x.x.x.x 1194 #external IP address

ca ca.crt
cert client.crt
key client.key

client
dev tun
proto tcp
resolv-retry infinite
nobind
persist-key

comp-lzo
verb 3


Top
Offline Profile  
Reply with quote  
 Post subject: Re: Cannot access with hostname of local domain (just by IP)
PostPosted: 18.10.2012 20:23 
DES
DES

Joined: 09.10.2012 17:53
Posts: 3
I solved this by adding
Code:
push "dhcp-option WINS 192.168.0.2"
to the tunneling server configuration file, Windows clients work fine, Mac OS X 10.8 clients should use the Tunnelblick beta version provided on http://code.google.com/p/tunnelblick/wi ... Entry?tm=2
I also managed to run the OpenVPN server on main server (192.168.0.2) correctly, but had to reconfigure "Routing and RAS" from the start to add Tap-Win32 adapter and then set the right static routes.
However Windows RRAS is quite nasty, because OpenVPNService won't come up correctly at system start (workaround with batch script to restart OpenVPNService after system start ;) ) and when OpenVPNService is shutted down, RRAS has some cache issues and won't route intranet clients anymore until RRAS is restarted. As a workaround I added a script to intelligently monitor this situation. If I find some time I try to solve this issues and let you know.


Top
Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ]  Moderator: Moderators

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Theme created StylerBB.net