More than one DNS

I tried to configure more than one DNS in WireGuard, e.g. 192.16o.1, 192.168.26.111

However only the first one is used on my Smartphone. OTH, when saving the WireGuard config, no error occurs either.

So, is a second DNS possible at all?

It is certainly possible to specify more than one DNS server and it will end up in your client wireguard conf file. However whether your client uses it or not is down to the client software that is used and or the mobile phone software. Many Mobile phones decide that they know better than you what DNS you should be using and with some packages they even hardcode the DNS in for you.

How are you determining that only the first one is used? Is that from the client logs?

1 Like

I just tested it out with my Android mobile using the WireGuard app and I made a successfull connection and I checked the details of the client end and it showed that it had included the two DNS servers I had specified.

So with the WireGuard client it seems to work that the client has taken both of the DNS servers into its config.

I just checked the WireGuard app on the Play Store and its screen shots show that you can specify two dns servers as

8.8.8.8, 8.8.4.4

Which is exactly how the IPFire code creates the config file contents.

Which client are you using?

EDIT:
Also tried an alternative WireGuard app called WG Tunnel and that also took on board the two DNS IP’s.

There is also Defguard but I can’t test that as it requires Android 12 minimum and I am on 11.

2 Likes

Thanks Adolf for your reply!

I’ve used PingTools from PlayStore which shows only the first DNS configured in WireGuard settings on IPFire. So does the original WireGuard app.

Ah wait: I’ve configured a single DNS when using the appropriate QR-Code to set up WG on cient side!

This means that modified settings on IPFire, after a initial client setup, won’t change anything. Sounds reasonable, but confuses at the end.

Yes, if you change the global settings then you have to recreate the client connections to take those changes on board the client config.

The old connections will continue working but with the old global settings.

1 Like

Thanks for this confirmation!