Page 1 of 1

[Bug] [Lollipop] DNS not set

Posted: Wed Apr 22, 2015 8:49 am
by blingg
I have two Android devices. The older is with 4.1.1 and the new one with 5.0.1. I want all of the traffic to pass through the VPN, including DNS queries, so in my server config I have:

Code: Select all

push "dhcp-option DNS <IP of local DNS server>"
push "redirect-gateway def1"
On the 4.1.1 device this works flawlessly and if I do "getprop net.dns1", I get the correct IP of the pushed DNS server. On the 5.0.1 device the IP remains unchanged, i.e. it is of the DNS server that is used before the VPN connection is brought up.
To rule out any misconfiguration on the client side, I carried over the ovpn file from the 4.1.1 device to the 5.0.1 one. I get the exact same log. It could be seen clearly that the DNS push command is received by the client, however, OpenVPN Connect fails to set the DNS on the newer device.
(Connecting to the same server with a Linux client, also updates the DNS correctly.)
Given the fact that the client configuration is the same, that the server is the same, and the only difference is the Android version, it would suggest that this could be a bug with OpenVPN Connect under Lollipop.

Re: [Bug] [Lollipop] DNS not set

Posted: Wed May 20, 2015 4:49 pm
by achilleas
I'm having the same issue. I don't have a pre-Lollipop device to test, but the configuration worked perfectly before upgrading Android.
Similarly, DNS settings are successfully pushed to desktop clients (Linux, networkmanager with openvpn plugin) without issue.

Re: [Bug] [Lollipop] DNS not set

Posted: Thu May 28, 2015 2:50 pm
by achilleas
OpenVPN for Android, by Arne Schwabe seems to work.
I'm listing all the settings I have enabled in this app for my VPN connection, even though some are irrelevant.
  • Pull Settings
    No local binding
    Override DNS Settings by Server (this is probably the most important setting).
    DNS Servers: 8.8.8.8, 8.8.4.4
    Bypass VPN for local networks
    Use default Route (for both IPv4 and 6).
The connection works with these settings, however, I suspect my DNS requests may be going to the local network.
I'm not sure how I can check this.