1

I am trying to get OpenVPN working on my Android device using the official OpenVPN app from the app store. I am running on a Verizon S6 running 5.1.1 and do not have root on the device. I have generated all the keys and installed the OpenVPN profile on the device. I successfully connect to the VPN as shown in both the server logs and the fact that I can access local webservers that are only present on the remote LAN such as a printer and the router. However I am unable to browse to any internet site. I tried to ping 8.8.8.8 from the device and it was successful. Any attempt to access a URL or even go directly to the google ip resolved by the server results in a DNS error. What is the right way to configure the DNS so that I can browse the internet through my VPN. I am able to use the VPN expected on an iPhone and a Macbook so all the necessary NAT rules and such are in place on the server.

Android Config File

client

dev tun

proto udp

remote $SERVER$ 1194

resolv-retry infinite

nobind

ca ca.crt
cert androidPhone.crt
key androidPhone.key

comp-lzo

verb 3

setprop net.dns1 8.8.8.8
setprop net.dns2 4.2.2.1

I tried it both with and without the setprop net.dns

0

Turns out my server config was missing the "push DNS ...." option. My other devices worked because I had set a DNS server in the adapter settings that overrode the lack of a DNS server being pushed by the OpenVPN server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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