Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

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.

share|improve this question
    
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 '12 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 '12 at 16:24
add comment

1 Answer

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.