I've set up an L2TP/IPsec PSK VPN between my phone and my home network. It works, but Android doesn't use my home DNS server, so none of my internal hostnames resolve. I can access internal servers by IP address, but not by name. How can I get the phone to use my internal DNS instead of whatever servers it normally uses?

Some background: I'm using a Samsung Epic 4G running Gingerbread. My VPN server is running xl2tpd and openswan on Linux. I checked the routing table on my phone, and traffic is correctly being routed through the VPN. On the server, there are options in the PPP config called "ms-dns-1" and "ms-dns-2" that allows the server to push DNS server IPs to the client. But apparently those options are only used by Microsoft clients. I've Googled the issue, and other people have the same problem, but I haven't been able to find a solution.

My phone isn't rooted. I'm willing to root the phone if I have to, but I'd prefer not to.

Edit, 2 months later

I finally found out what was wrong, and it had nothing to do with DNS. I'm using my desktop computer as the VPN endpoint, and I had neglected to turn on IP forwarding, so it wasn't forwarding packets. I could access services on the VPN endpoint itself, but anything that required forwarding packets (including DNS lookups) failed. The VPN client was correctly picking up DNS information, but it couldn't reach the DNS server because of the forwarding issue. Once I corrected that, the VPN worked perfectly. To summarize, I'm an idiot.

  • Isn't there a DNS configuration for the VPN connections? When I set up my PPTP VPN connection, it asked me for remote DNS servers specifically.
    – Mr. TA
    May 21, 2012 at 18:16
  • I think it only asks for DNS servers if you configure a static IP. If you use DHCP (very common), it picks up everything from the DHCP server.
    – Jonathan
    May 22, 2012 at 16:24
  • I have similar issue. (Still have.) There is something I don't understand in your initial description. You wrote "I can access internal servers by IP address, but not by name." Did you are able to access internal machines with IP forwarding turned off?
    – utom
    Jan 1, 2015 at 19:52
  • @utom No, that was another mistake on my part. I was able to access my VPN endpoint by IP address. I didn't even check other IP addresses. I just assumed I could access them the same way. If I had checked other addresses, I might have found the issue sooner.
    – Jonathan
    Jan 5, 2015 at 13:53

1 Answer 1


You might want to take a look at the DNS Settings app, which claims to be able to do what you want (you just have to switch once to a static IP to change the DNS settings, and then switch back to dynamic IP, according to the description). That's the only non-root app I could find for this issue -- there are two more apps at least, but they require root to work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .