You are not logged in.

#1 2022-05-16 12:07:35

backay1
Member
Registered: 2022-05-08
Posts: 24

Network Manager does not work if systemd-resolved is running

After starting systemd-resolved and symlinking /etc/resolv.conf to /run/systemd/resolve/stub-resolv.conf, Network Manager shows limited connectivity.

RUNNING  VERSION  STATE                  STARTUP  CONNECTIVITY  NETWORKING  WIFI-HW    WIFI       WWAN-HW    WWAN
running  1.36.4   connected (site only)  started  limited       enabled     enabled    enabled    enabled    enabled

I can ping ip addresses, but not domain names and I can't browse the internet.

Offline

#2 2022-05-16 12:48:54

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,676

Re: Network Manager does not work if systemd-resolved is running

After starting systemd-resolved and symlinking

did you restart NM/reboot afterwards?

Offline

#3 2022-05-16 13:12:42

backay1
Member
Registered: 2022-05-08
Posts: 24

Re: Network Manager does not work if systemd-resolved is running

Stopped NM and wpa_supplicant, started systemd-resolved, made the symlink, and started NM

Last edited by backay1 (2022-05-16 13:13:15)

Offline

#4 2022-05-16 13:19:14

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,676

Re: Network Manager does not work if systemd-resolved is running

resolvectl status
resolvectl query archlinux.org

Offline

#5 2022-05-16 13:37:05

backay1
Member
Registered: 2022-05-08
Posts: 24

Re: Network Manager does not work if systemd-resolved is running

resolvectl status

Global
           Protocols: +LLMNR +mDNS +DNSOverTLS DNSSEC=yes/supported
    resolv.conf mode: stub
Fallback DNS Servers: 1.1.1.1#cloudflare-dns.com 9.9.9.9#dns.quad9.net
                      8.8.8.8#dns.google 2606:4700:4700::1111#cloudflare-dns.com
                      2620:fe::9#dns.quad9.net 2001:4860:4860::8888#dns.google

Link 2 (enp2s0)
Current Scopes: none
     Protocols: -DefaultRoute +LLMNR -mDNS +DNSOverTLS DNSSEC=yes/supported

Link 3 (wlan0)
    Current Scopes: DNS LLMNR/IPv4
         Protocols: +DefaultRoute +LLMNR -mDNS +DNSOverTLS DNSSEC=yes/supported
Current DNS Server: 192.168.1.1
       DNS Servers: 192.168.1.1
        DNS Domain: homenet.telecomitalia.it
resolvectl query archlinux.org

archlinux.org: resolve call failed: All attempts to contact name servers or networks failed

Offline

#6 2022-05-16 13:39:35

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,676

Re: Network Manager does not work if systemd-resolved is running

nmap -p53 192.168.1.1
ping -4 google.com
dig google.com
dig @1.1.1.1 google.com

Offline

#7 2022-05-16 14:15:20

backay1
Member
Registered: 2022-05-08
Posts: 24

Re: Network Manager does not work if systemd-resolved is running

nmap -p53 192.168.1.1

Starting Nmap 7.92 ( https://nmap.org ) at 2022-05-16 16:05 CEST
Nmap scan report for _gateway (192.168.1.1)
Host is up (0.0090s latency).

PORT   STATE SERVICE
53/tcp open  domain

Nmap done: 1 IP address (1 host up) scanned in 0.20 seconds
ping -4 google.com

ping: google.com: Temporary failure in name resolution
dig google.com

; <<>> DiG 9.18.2 <<>> google.com
;; global options: +cmd
;; connection timed out; no servers could be reached
dig @1.1.1.1 google.com

; <<>> DiG 9.18.2 <<>> @1.1.1.1 google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47144
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
;; QUESTION SECTION:
;google.com.                    IN      A

;; ANSWER SECTION:
google.com.             268     IN      A       142.250.184.110

;; Query time: 49 msec
;; SERVER: 1.1.1.1#53(1.1.1.1) (UDP)
;; WHEN: Mon May 16 16:12:37 CEST 2022
;; MSG SIZE  rcvd: 55

Offline

#8 2022-05-16 14:22:57

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,676

Re: Network Manager does not work if systemd-resolved is running

cat /etc/resolv.conf
stat  /etc/resolv.conf

Offline

#9 2022-05-16 14:32:09

backay1
Member
Registered: 2022-05-08
Posts: 24

Re: Network Manager does not work if systemd-resolved is running

cat /etc/resolv.conf

nameserver 127.0.0.53
options edns0 trust-ad
search homenet.telecomitalia.it
stat  /etc/resolv.conf

  File: /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf
  Dim.: 39              Blocchi: 0          Blocco di IO: 4096   collegamento simbolico
Device: 8,8     Inode: 265088      Links: 1
Accesso: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (    0/    root)
Accesso  : 2022-05-16 16:24:46.946097601 +0200
Modifica : 2022-05-16 16:24:46.896097720 +0200
Cambio   : 2022-05-16 16:24:46.896097720 +0200
Creazione: 2022-05-16 16:24:46.896097720 +0200

(sorry for the italian words in stat output)

Offline

#10 2022-05-16 14:41:01

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,676

Re: Network Manager does not work if systemd-resolved is running

nmap -p 53 127.0.0.53
dig @127.0.0.53 google.com
dig @192.168.1.1 google.com

Offline

#11 2022-05-16 15:01:36

backay1
Member
Registered: 2022-05-08
Posts: 24

Re: Network Manager does not work if systemd-resolved is running

nmap -p 53 127.0.0.53

Starting Nmap 7.92 ( https://nmap.org ) at 2022-05-16 16:58 CEST
Nmap scan report for localhost (127.0.0.53)
Host is up (0.000061s latency).

PORT   STATE SERVICE
53/tcp open  domain

Nmap done: 1 IP address (1 host up) scanned in 0.06 seconds
dig @127.0.0.53 google.com

; <<>> DiG 9.18.2 <<>> @127.0.0.53 google.com
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached
dig @192.168.1.1 google.com

; <<>> DiG 9.18.2 <<>> @192.168.1.1 google.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 36014
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1220
; COOKIE: 9ff1e053ad0189885451ce5362826704652a5c190352e364 (good)
;; QUESTION SECTION:
;google.com.                    IN      A

;; ANSWER SECTION:
google.com.             85      IN      A       142.250.184.110

;; Query time: 16 msec
;; SERVER: 192.168.1.1#53(192.168.1.1) (UDP)
;; WHEN: Mon May 16 17:00:20 CEST 2022
;; MSG SIZE  rcvd: 83

Offline

#12 2022-05-16 15:37:48

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,676

Re: Network Manager does not work if systemd-resolved is running

Any resolved errors in the journal?
There's a DNS server (well, "something" listening on #53 - supposingly systemd-resolved) on 127.0.0.53 but it doesn't respond to DNS queries.

Also "ip a; ip r"
There's

Link 2 (enp2s0)
Link 3 (wlan0)

what means that resolved only cares about the wlan0 NIC, but enp2s0 suggests that you're not using tranditional interface names, so this could ultimately just be another https://wiki.archlinux.org/title/Networ … face_names issue in the clusterfuck relationship between systemd and networks…

Offline

#13 2022-05-16 16:05:05

backay1
Member
Registered: 2022-05-08
Posts: 24

Re: Network Manager does not work if systemd-resolved is running

There's a DNS server (well, "something" listening on #53 - supposingly systemd-resolved) on 127.0.0.53 but it doesn't respond to DNS queries.

Does it matter that DNSOverTLS is enabled (data stream through port 53 should instead go through port 853)? Now that I have disabled DOT everything seems to be working fine.

Offline

#14 2022-05-16 16:11:24

progandy
Member
Registered: 2012-05-17
Posts: 5,319

Re: Network Manager does not work if systemd-resolved is running

DNSOverTLS is used for the connection to the external servers. You local applications connect unencrypted to systemd-resolved which then uses an encrypted connection to forward the request.

There are three likely problems with DNSOverTLS:
1) your ISP is blocking that protocol and possibly intercepting unencrypted traffic.
2) your time is incorrect and the SSL connection cannot be verified/established.
3) 192.168.1.1 is unable to understand that protocol. Systemd might silently fail instead of using the FallbackServer entries. (I do not know if resloved behaves in that way)

Edit: you can test if dns over tls works with the dog package (you cannot easily detect dns interception, maybe try to compare the ip address you receive from cloudflare)

# test dns over https
dog -H example.com @https://1.1.1.1/dns-query
# test dns over tls
dog -S example.com @1.1.1.1
# test tcp intercept, maybe compare ip to dns over https?
dog -T whoami.cloudflare @1.1.1.1 --class CH -t TXT
dog -H whoami.cloudflare @https://1.1.1.1/dns-query --class CH -t TXT
curl -4 https://icanhazip.com

Last edited by progandy (2022-05-16 16:35:25)


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

Offline

#15 2022-05-16 17:01:30

backay1
Member
Registered: 2022-05-08
Posts: 24

Re: Network Manager does not work if systemd-resolved is running

dog -H google.com @https://1.1.1.1/dns-query

A google.com. 4m12s   142.250.180.174
dog -S google.com @1.1.1.1

A google.com. 3m28s   142.250.180.174
dog -T whoami.cloudflare @1.1.1.1 --class CH -t TXT

TXT whoami.cloudflare. 0s
dog -H whoami.cloudflare @https://1.1.1.1/dns-query --class CH -t TXT

TXT whoami.cloudflare. 0s
curl -4 https://icanhazip.com

curl: (6) Could not resolve host: icanhazip.com

Last edited by backay1 (2022-05-16 17:20:15)

Offline

#16 2022-05-16 17:14:52

progandy
Member
Registered: 2012-05-17
Posts: 5,319

Re: Network Manager does not work if systemd-resolved is running

So I guess option 3) is the case, the direct tls connection has no problems.
DNS resolution failed for curl, have you enabled DNSoverTLS again for that test?
And you may want to delete the IP printed by the whoami and icanhazip lines, that should be your own.


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

Offline

#17 2022-05-16 17:21:37

backay1
Member
Registered: 2022-05-08
Posts: 24

Re: Network Manager does not work if systemd-resolved is running

DNS resolution failed for curl, have you enabled DNSoverTLS again for that test?

Yes. DOT was enabled for all of the tests.

Last edited by backay1 (2022-05-16 17:23:31)

Offline

Board footer

Powered by FluxBB