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:
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.