android and endpoint dyndns

Andre Heider a.heider at gmail.com
Wed Jan 25 09:28:37 UTC 2023


Hi all,

I'm using wireguard on android, and it works just fine.

The wg endpoint also has it's own dns server, which I too configured on 
the wg droid app, so I can reach my network boxes with their internal 
domain names.

I also enabled "Always-on VPN" and "Block connections without VPN" on 
the phone's system settings, so everything goes through the wg 
interface. When it's not up nothing gets in or out - just as desired.

Unfortunately I have to live with a changing ip on the server/endpoint. 
Which is why I use a dyndns hostname as wg endpoint.

Now, if I set "Private DNS" on the droid's system settings to a specific 
*public* server ("Private DNS provider hostname"), it even works if the 
ip of my wg server changes! Meaning the wg vpn setup automagically picks 
up the new ip. (How, btw? Is that an android feature or implemented on 
the wg app?).

But using a public server there obviously breaks reaching my internal 
boxes using their domain names, since those are only provided by my own 
dns server. And for that, I have to set "Private DNS" to "Automatic". 
But that in return breaks the wg setup if my endpoint's ip changes, I 
have to manually dis/reenable the wg interface then. The workflow/around 
then becomes:
- set "Private DNS" to "Automatic"
- disable wg interface
- enable wg interface
- set "Private DNS" to "Private DNS provider hostname"

Which gets really annoying as you can imagine.

Is there a solution to this? I guess if the wg app would use a specific 
dns server to just resolve the endpoint's hostname it should work? Is 
that possible?

Thanks,
Andre


More information about the WireGuard mailing list