DHCP Option DNS not respected by Android - looking for a definite guide

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
stev-e
OpenVpn Newbie
Posts: 1
Joined: Mon Mar 06, 2023 7:34 pm

DHCP Option DNS not respected by Android - looking for a definite guide

Post by stev-e » Mon Mar 06, 2023 8:00 pm

Hi everybody,

searching around one can find a lot of "maybe" working solutions for the problem I describe in a minute. But none of them are working for me and none of them seem to be officially confirmed. So I am more or less looking for a definite guide that says: It is possible or it is not and if it is possible, here is what definitly does the trick... In regards of OpenVPN: It would be enough if someone says: Can't answer this here, must be answered by Android.

So, here is my problem: I connect to an OpenVPN server

Code: Select all

OpenVPN 2.5.4 [git:DSM7-1-Official/b702bec612113074+] aarch64-unknown-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Dec  1 2021
via the Android App

Code: Select all

3.3.0(8367) on Android 13 on a Google Pixel 5
The connection propagates an option to set a DNS server and from the logs I can see the option beeing recognized:

Code: Select all

[dhcp-option] [DNS] [192.168.x.y]
In the OVPN App the settings are:

Code: Select all

DNS Fallback : off
Seamless Tunnel : off and on (tried both)
In Android settings are:

Code: Select all

Network and Internet ->  Private DNS : off
Network and Internet -> VPN -> OpenVPN Connect -> Always-on VPN : on
Network and Internet -> VPN -> OpenVPN Connect -> Block connecions without VPN : on and off (tried both)
So, with these settings applied and a connection esteblished the Android phone does not respect the DNS server.

When "Block connecions without VPN" is enabled

Code: Select all

dig host.my-domain.com
times out because there is no DNS server the system recognizes it can make use of. When "Block connecions without VPN" is disabled

Code: Select all

dig host.my-domain.com
cannot resolve the DNS entry because it uses 8.8.8.8 as a DNS server.

Is there anything from your side (OpenVPN team) that you can tell me about that? Do I do something wrong? Or is it just the damn Android phone that does what it wants? :evil:

Post Reply