DHCP Option DNS not respected by Android - looking for a definite guide
Posted: 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
via the Android App
The connection propagates an option to set a DNS server and from the logs I can see the option beeing recognized:
In the OVPN App the settings are:
In Android settings are:
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 times out because there is no DNS server the system recognizes it can make use of. When "Block connecions without VPN" is disabled 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?
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
Code: Select all
3.3.0(8367) on Android 13 on a Google Pixel 5
Code: Select all
[dhcp-option] [DNS] [192.168.x.y]
Code: Select all
DNS Fallback : off
Seamless Tunnel : off and on (tried both)
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)
When "Block connecions without VPN" is enabled
Code: Select all
dig host.my-domain.com
Code: Select all
dig host.my-domain.com
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?
