How to resolve internet hostnames through ipsec/l2tpd vpn and a remote dns server

binddomain-name-systemvpn

I have done the setup of a ipsec/l2tpd vpn server followin this tutorial http://blog.riobard.com/2010/04/30/l2tp-over-ipsec-ubuntu.

I'm able to connect to the server, and redirect all traffic through the vpn from a mac os machine.

In the remote accessed network, there is a bind dns server that the remote machines use as a local dns (they use it as a dns, and are able to access the local machines names defined there, and other Internet hosts).

The problem is that, pushing that dns to the vpn client, gives me access to the local names, but not internet host name resolution. If I push the google dns, I can get name resolution and web browsing through the vpn, but obviously, not the local name ones.

This is my options.xl2tpd file:

require-mschap-v2
ms-dns 192.168.1.3
#ms-dns 8.8.8.8
#ms-dns 8.8.4.4
asyncmap 0
auth
crtscts
lock
hide-password
modem
debug
name l2tpd
proxyarp
lcp-echo-interval 30
lcp-echo-failure 4

Traceroutes with the above config:

traceroute 192.168.1.9
traceroute to 192.168.1.9 (192.168.1.9), 64 hops max, 52 byte packets
 1  10.1.2.1 (10.1.2.1)  14.823 ms  13.544 ms  14.154 ms
 2  local.server.com (192.168.1.9)  13.740 ms  11.511 ms  14.794 ms

traceroute google.com
traceroute: unknown host google.com

Any help will be appreciated. Kind regards, Simon.

EDIT:

Uncommenting the second ms-dns line, makes the client work as expected under windows, but fails in mac os or iOs. Looking to make it work in apple devices.

Best Answer

Maybe I am being stupid, but can you not just uncomment:

#ms-dns 8.8.8.8

This would then attempt to resolve a DNS entry at 192.168.1.3, which will fail and then send the attempt to the second DNS server, 8.8.8.8, which should work?

Also, it maybe worth seeing if you can forward specific domain traffic to a server, which is normally done by typing:

ms-dns /yourdomain.com/192.168.1.3
ms-dns 8.8.8.8
Related Topic