You are not logged in.

#1 2021-10-22 13:26:36

p_noumenon
Member
Registered: 2021-10-22
Posts: 4

[SOLVED] Manual DNS settings not working

I've been using iwd for ~6 months now, it's been working very well, but right now I'm trying to set DNS manually, and can't get it to work.

I've configured it to use systemd-resolved (which is the default anyway, I read) in /etc/iwd/main.conf as described here:

[General]
EnableNetworkConfiguration=true

[Network]
#EnableIPv6=true
NameResolvingService=systemd

So far, so good. Now I followed the instructions here and created the following symlink:

ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

Then, as it says a bit further down, I created the folder and file /etc/systemd/resolved.conf.d/dns_servers.conf, and set it to:

[Resolved]
DNS=1.1.1.1 2606:4700:4700::1111
Domains=~.

Now I wasn't quite sure what I had to restart to set this in effect (I tried systemctl restart systemd-resolved), so I just rebooted the system.

Now the output of resolvectl status is:

Global
           Protocols: +LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported
    resolv.conf mode: stub
Fallback DNS Servers: 1.1.1.1 9.9.9.10 8.8.8.8 2606:4700:4700::1111 2620:fe::10 2001:4860:4860::8888

Link 3 (wlan0)
    Current Scopes: DNS LLMNR/IPv4
         Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 192.168.10.1
       DNS Servers: 192.168.10.1
        DNS Domain: home

In other words, it seems to correctly detect the change to stub mode, but it's still not using the desired DNS server.

I'm mostly trying to go by the instructions here, I don't really properly understand how this works or is supposed to work, so if anyone would care to explain it to me and what I'm doing wrong, that would be great.

Last edited by p_noumenon (2021-10-22 16:58:39)

Offline

#2 2021-10-22 14:52:23

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 9,589

Re: [SOLVED] Manual DNS settings not working

The 192.168.10.1 is probably set through dhcp which iwd then reported to systemd-resolved .

please post /etc/iwd/main.conf .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
Did you use the guided installer ? If yes, I can't help you.

(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2021-10-22 15:07:43

progandy
Member
Registered: 2012-05-17
Posts: 4,637

Re: [SOLVED] Manual DNS settings not working

The section in your dns_servers.conf should be called [Resolve] without the "d". If you do that, systemd-resolved should pick your custom server for everything except the "*.home" domain.


| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |

Offline

#4 2021-10-22 15:57:24

p_noumenon
Member
Registered: 2021-10-22
Posts: 4

Re: [SOLVED] Manual DNS settings not working

Lone_Wolf wrote:

please post /etc/iwd/main.conf .

But...I already did?

progandy wrote:

The section in your dns_servers.conf should be called [Resolve] without the "d". If you do that, systemd-resolved should pick your custom server for everything except the "*.home" domain.

Ah, I see. Thanks, that solved it, I believe. The output of resolvectl status is now:

Global
           Protocols: +LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported
    resolv.conf mode: stub
         DNS Servers: 1.1.1.1 2606:4700:4700::1111
Fallback DNS Servers: 1.1.1.1 9.9.9.10 8.8.8.8 2606:4700:4700::1111 2620:fe::10 2001:4860:4860::8888
          DNS Domain: ~.

Link 3 (wlan0)
Current Scopes: DNS LLMNR/IPv4
     Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
   DNS Servers: 192.168.10.1
    DNS Domain: home

I assume the DNS Servers part under Global is what is now being used.

Offline

#5 2021-10-23 09:53:54

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 9,589

Re: [SOLVED] Manual DNS settings not working

p_noumenon wrote:
Lone_Wolf wrote:

please post /etc/iwd/main.conf .

But...I already did?

I asked because I had the impression what you posted was  a snippet , not the whole content of the file.
Glad to see the issue is solved now.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
Did you use the guided installer ? If yes, I can't help you.

(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB