New Openvpn install and DNS is broken but good.
Posted: Tue Jun 28, 2011 12:25 am
Folks,
This is my first run at opnevpn. I read up, studied, consulted no less than three how to's and all went smooth. The client connected fine, and I could ping around the network.
Then, came the names. I realized that when connected, I could not resolve hostnames from either the target network, or my local one. If I order the tap adapter first, nslookup queries the dns server on that network, and then I get a dns timeout from the server 2008 Domain Controller, i.e.:
C:\Users\>nslookup media1 192.168.1.7
DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: 192.168.1.7
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Request to UnKnown timed-out
If I order the wireless connection first, then I get no reply from the local dns server (server 2003 virtual machine).
The near side --------------
C:\Users\>nslookup http://www.google.com
DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: 192.168.2.250
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Request to UnKnown timed-out
But If I run tracroutes, then the names get resolved.
...over a maximum of 30 hops:
...
3 19 ms 16 ms 18 ms MEDIA1 [192.168.10.5]
I can ssh, and ping via IP, but any name resolution crashes hard. I have poured over forums for six hours, but nothing that's worked for others has helped and I can't make sense of no getting a response from the local dns server when openvpn is connected.
As soon as I disconnect, I get webpages again.
C:\Users\>nslookup www.facebook.com
Server: mits-dc1.nogroup.net
Address: 192.168.2.250
Non-authoritative answer:
Name: www.facebook.com
Address: 69.171.224.12
route print shows all the packets going where they are supposed to. A little help here?
Many Thanks,
MORE STUFF:
Server = centos 5.5
Client = Windows 7
Far side dns server Windows 2008 R2.
server config file:
proto udp
dev tun
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
key /etc/openvpn/easy-rsa/2.0/keys/server.key
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem
server 10.8.0.0 255.255.255.0
push "route 192.168.1.0 255.255.255.0"
push "route 192.168.2.0 255.255.255.0"
push "route 192.168.10.0 255.255.255.0"
push "route 192.168.20.0 255.255.255.0"
push "route 192.168.30.0 255.255.255.0"
push "route 192.168.40.0 255.255.255.0"
push "route 192.168.50.0 255.255.255.0"
push "dhcp-option DNS 192.168.1.7"
push "dhcp-option DNS 192.168.1.17"
push "dhcp-option WINS 192.168.1.7"
push "dhcp-option DOMAIN ipdomain.org"
client-to-client
keepalive 10 120
comp-lzo
user nobody
group nobody
persist-key
persist-tun
status openvpn-status.log
log-append openvpn.log
verb 6
mute 20
Client Config File:
client
dev tun
proto udp
remote 70.0.0.6 1194
resolv-retry infinite
nobind
persist-key
persist-tun
mute-replay-warnings
ca ca.crt
cert client1.crt
key client1.key
ns-cert-type server
comp-lzo
verb 3
mute 20
This is my first run at opnevpn. I read up, studied, consulted no less than three how to's and all went smooth. The client connected fine, and I could ping around the network.
Then, came the names. I realized that when connected, I could not resolve hostnames from either the target network, or my local one. If I order the tap adapter first, nslookup queries the dns server on that network, and then I get a dns timeout from the server 2008 Domain Controller, i.e.:
C:\Users\>nslookup media1 192.168.1.7
DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: 192.168.1.7
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Request to UnKnown timed-out
If I order the wireless connection first, then I get no reply from the local dns server (server 2003 virtual machine).
The near side --------------
C:\Users\>nslookup http://www.google.com
DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: 192.168.2.250
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.
*** Request to UnKnown timed-out
But If I run tracroutes, then the names get resolved.
...over a maximum of 30 hops:
...
3 19 ms 16 ms 18 ms MEDIA1 [192.168.10.5]
I can ssh, and ping via IP, but any name resolution crashes hard. I have poured over forums for six hours, but nothing that's worked for others has helped and I can't make sense of no getting a response from the local dns server when openvpn is connected.
As soon as I disconnect, I get webpages again.
C:\Users\>nslookup www.facebook.com
Server: mits-dc1.nogroup.net
Address: 192.168.2.250
Non-authoritative answer:
Name: www.facebook.com
Address: 69.171.224.12
route print shows all the packets going where they are supposed to. A little help here?
Many Thanks,
MORE STUFF:
Server = centos 5.5
Client = Windows 7
Far side dns server Windows 2008 R2.
server config file:
proto udp
dev tun
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
key /etc/openvpn/easy-rsa/2.0/keys/server.key
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem
server 10.8.0.0 255.255.255.0
push "route 192.168.1.0 255.255.255.0"
push "route 192.168.2.0 255.255.255.0"
push "route 192.168.10.0 255.255.255.0"
push "route 192.168.20.0 255.255.255.0"
push "route 192.168.30.0 255.255.255.0"
push "route 192.168.40.0 255.255.255.0"
push "route 192.168.50.0 255.255.255.0"
push "dhcp-option DNS 192.168.1.7"
push "dhcp-option DNS 192.168.1.17"
push "dhcp-option WINS 192.168.1.7"
push "dhcp-option DOMAIN ipdomain.org"
client-to-client
keepalive 10 120
comp-lzo
user nobody
group nobody
persist-key
persist-tun
status openvpn-status.log
log-append openvpn.log
verb 6
mute 20
Client Config File:
client
dev tun
proto udp
remote 70.0.0.6 1194
resolv-retry infinite
nobind
persist-key
persist-tun
mute-replay-warnings
ca ca.crt
cert client1.crt
key client1.key
ns-cert-type server
comp-lzo
verb 3
mute 20