I'm in a strange situation.
- At work, I've set up OpenVPN + DNSMasq DNS server.
10.0.0.100is the internal IP of the VPN server.
10.0.0.200is the internal IP of the DNS server.
If I connect to the VPN server from external network, it all works fine - I can ping and ssh in to the local machines by their ip addresses.
However, for some reason, I cannot access the DNS service. I can ssh into
10.0.0.200. So I tried
nslookup HOSTNAME 10.0.0.200, but I only get
;; connection timed out; no servers could be reached. This occurs both for internal and external domain names.
While OpenVPN is running, If I ssh into any of the machine in local area network, and run
nslookup HOSTNAME 10.0.0.200, it works as the intended. Morever, I can even telnet to the port 53 of the machine
To debug the problem, I tried few more things. I gave an external IP to the DNS server,
188.8.131.52. In external network, I can run
nslookup HOSTNAME 184.108.40.206, the command executes as expected - it resolves both internal and external domain names.
However, when I start Openvpn client in the client machine, and run
nslookup HOSTNAME 220.127.116.11, it did not execute with the same
connection timed out; error message.
traceroute to 18.104.22.168 (22.214.171.124), 30 hops max, 60 byte packets 1 126.96.36.199 (188.8.131.52) 25.705 ms 25.714 ms 25.790 ms 2 * * * 3 * * * 4 * * * 5 * * * 6 * * * 7 * * * 8 * * * 9 * * * 10 * * * 11 * * as7065.xe-1-0-6.ar1.pao1.us.nlayer.net (184.108.40.206) 25.742 ms 12 tengig4-3.cr1.lsatca11.sonic.net (220.127.116.11) 25.658 ms 33.069 ms 33.067 ms 13 po2.cr1.colaca01.sonic.net (18.104.22.168) 33.075 ms 33.009 ms 37.902 ms 14 gig1-1-1.gw.snfcca01.sonic.net (22.214.171.124) 40.420 ms 40.332 ms 40.364 ms 15 * * * 16 ...(and go on)
126.96.36.199 is the gateway of the virtual interface created by OpenVPN.
At that point, I also noticed that
Wed May 18 22:32:44 2011 /sbin/route add -net 188.8.131.52 netmask 255.255.255.255 gw 184.108.40.206 metric 101 was in the startup message of of the openvpn client.
So, I suspect that routing DNS query traffic over OpenVPN is somehow causing the problem. However, I do not know
This is a lot of fragmented information, with a lot of more uncertainties. To summarize:
- The problem: I cannot properly access the DNS server in local network via VPN, even though everything else seem to work fine.
- I suspect that routing DNS traffic via OpenVPN is a problem, but I am not sure, and I do not know the solution for it.