You are not logged in.

#1 2024-12-16 06:15:16

giorez
Member
Registered: 2024-04-17
Posts: 14

[SOLVED] DNS resolver issues with NM & systemd-resolved

there is any simple fix to make resolver working again? i have a messed system with network manager and systemd. thanks

Last edited by giorez (2024-12-17 20:42:24)

Offline

#2 2024-12-16 06:37:21

-thc
Member
Registered: 2017-03-15
Posts: 905

Re: [SOLVED] DNS resolver issues with NM & systemd-resolved

giorez wrote:

there is any simple fix to make resolver working again? i have a messed system with network manager and systemd. thanks

Disable systemd-resolved (default state), remove /etc/resolv.conf and restart

systemctl disable systemd-resolved
rm /etc/resolv.conf
reboot

Afterwards your "/etc/resolv.conf" should be created by NetworkManager.

Offline

#3 2024-12-16 12:03:24

giorez
Member
Registered: 2024-04-17
Posts: 14

Re: [SOLVED] DNS resolver issues with NM & systemd-resolved

unfortunatelly the etc/resolv.conf is not created. all other machine (ipad, iphone, pc win, pc mac) are working without problem on my home wifi. it's very frustrating to see a linux machine having problem regarding network connection no ethernet, nor wifi. my linux machine can connect just to the router's webpage for administration

Ps after reboot is created etc/resolv.conf as symlink to .../stub-resolv.conf, but .../stub-resolv.conf does NOT exist

any chance to reinstall some packages offline to fix the problem?

Last edited by giorez (2024-12-16 12:26:09)

Offline

#4 2024-12-16 12:42:55

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,798

Re: [SOLVED] DNS resolver issues with NM & systemd-resolved

Giorez, please start your own thread.

Include the output of find /etc/systemd -type l -exec test -f {} \; -print


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#5 2024-12-16 12:58:40

-thc
Member
Registered: 2017-03-15
Posts: 905

Re: [SOLVED] DNS resolver issues with NM & systemd-resolved

giorez wrote:

it's very frustrating to see a linux machine having problem regarding network connection no ethernet, nor wifi. my linux machine can connect just to the router's webpage for administration

Since Arch expects you to do the configuration by yourself - that mess is yours.

giorez wrote:

Ps after reboot is created etc/resolv.conf as symlink to .../stub-resolv.conf, but .../stub-resolv.conf does NOT exist

The "stub-resolv.conf" file not existing means systemd-resolved is not running - that's O.K.

giorez wrote:

any chance to reinstall some packages offline to fix the problem?

No. You need to analyze why the systemd-resolved link gets re-created even if it's not running.

Offline

#6 2024-12-16 13:13:41

seth
Member
Registered: 2012-09-03
Posts: 64,545

Re: [SOLVED] DNS resolver issues with NM & systemd-resolved

Maybe we should first check what giorez' state is tbw, since they obviously don't know…

ip a; ip r
dig google.com
resolvectl status
find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f

Though

my linux machine can connect just to the router's webpage for administration

indeed sound somewhat DNS related

Edit: @Lone_Wolf, probably just split off #13 ff.?

Last edited by seth (2024-12-16 13:14:38)

Offline

#7 2024-12-16 18:23:15

giorez
Member
Registered: 2024-04-17
Posts: 14

Re: [SOLVED] DNS resolver issues with NM & systemd-resolved

sorry I'm not expert, I'm trying to fix my mess. here is the console output
thanks

[gio@aimecarc ~]$ ip a; ip r
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute 
       valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether c4:2c:03:2f:31:e1 brd ff:ff:ff:ff:ff:ff
    altname enxc42c032f31e1
    inet 192.168.1.166/24 brd 192.168.1.255 scope global dynamic noprefixroute enp2s0
       valid_lft 42929sec preferred_lft 42929sec
    inet6 fd81:7897:c7ad::f29/128 scope global dynamic noprefixroute 
       valid_lft 42929sec preferred_lft 42929sec
    inet6 fd81:7897:c7ad:0:ae29:2a5e:af8b:e0e0/64 scope global noprefixroute 
       valid_lft forever preferred_lft 604529sec
    inet6 fe80::691:f210:991a:1b80/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
3: wls1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether de:43:18:1f:4d:94 brd ff:ff:ff:ff:ff:ff permaddr c8:bc:c8:b7:f0:31
    altname wlp3s0
    altname wlxc8bcc8b7f031
default via 192.168.1.1 dev enp2s0 proto dhcp src 192.168.1.166 metric 100 
192.168.1.0/24 dev enp2s0 proto kernel scope link src 192.168.1.166 metric 100 
[gio@aimecarc ~]$ dig google.com
bash: dig: command not found
(sorry at the moment, I can't install dig on this system)
[gio@aimecarc ~]$ resolvectl status
Failed to get global data: Could not activate remote peer 'org.freedesktop.resolve1': activation request failed: unknown unit
[gio@aimecarc ~]$ find /etc/systemd -type l -exec test -f {} \; -print | awk -F'/' '{ printf ("%-40s | %s\n", $(NF-0), $(NF-1)) }' | sort -f
dbus-org.freedesktop.nm-dispatcher.service | system
display-manager.service                  | system
getty@tty1.service                       | getty.target.wants
gnome-keyring-daemon.socket              | sockets.target.wants
NetworkManager-wait-online.service       | network-online.target.wants
NetworkManager.service                   | multi-user.target.wants
p11-kit-server.socket                    | sockets.target.wants
pipewire-pulse.socket                    | sockets.target.wants
pipewire-session-manager.service         | user
pipewire.socket                          | sockets.target.wants
remote-fs.target                         | multi-user.target.wants
sshd.service                             | multi-user.target.wants
systemd-userdbd.socket                   | sockets.target.wants
wireplumber.service                      | pipewire.service.wants
xdg-user-dirs-update.service             | default.target.wants

Last edited by giorez (2024-12-17 06:22:54)

Offline

#8 2024-12-16 18:34:03

giorez
Member
Registered: 2024-04-17
Posts: 14

Re: [SOLVED] DNS resolver issues with NM & systemd-resolved

A) if I remove '/etc/resolv.conf' and reboot, a new symlink '/etc/resolv.conf' to nowhere is created
b) if I remove '/etc/resolv.conf', and restart NetworkManager, a new '/etc/resolv.conf' with following content

# Generated by NetworkManager
search lan
nameserver 127.0.0.53
options edns0 trust-ad

Both options don't fix the issue

C) if I overwrite '/etc/resolv.conf' like the following

# Generated by NetworkManager
search lan
nameserver 192.168.1.1
options edns0 trust-ad

at least pacman can browse the remote server, but I can't browse any website in internet

Last edited by giorez (2024-12-17 06:16:00)

Offline

#9 2024-12-16 21:40:31

-thc
Member
Registered: 2017-03-15
Posts: 905

Re: [SOLVED] DNS resolver issues with NM & systemd-resolved

Check if "/etc/NetworkManager/NetworkManager.conf" contains no non-comment lines and "/etc/NetworkManager/conf.d" is empty.
If not - post all items here.

Offline

#10 2024-12-17 05:55:04

giorez
Member
Registered: 2024-04-17
Posts: 14

Re: [SOLVED] DNS resolver issues with NM & systemd-resolved

@-thc here is the situation

[gio@aimecarc ~]$ cat /etc/NetworkManager/NetworkManager.conf
# Configuration file for NetworkManager.
# See "man 5 NetworkManager.conf" for details.

[gio@aimecarc conf.d]$ cd /etc/NetworkManager/conf.d
[gio@aimecarc conf.d]$ ls -a
.  ..

Offline

#11 2024-12-17 05:58:58

giorez
Member
Registered: 2024-04-17
Posts: 14

Re: [SOLVED] DNS resolver issues with NM & systemd-resolved

@seth here is the reply

[gio@aimecarc ~]$ ping  -c1 google.com; ping -4  -c1 google.com; ping -6 -c1 google.com
PING google.com (142.251.36.78) 56(84) bytes of data.
64 bytes from prg03s10-in-f14.1e100.net (142.251.36.78): icmp_seq=1 ttl=58 time=78.1 ms

--- google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 78.057/78.057/78.057/0.000 ms
PING google.com (142.251.36.78) 56(84) bytes of data.
64 bytes from prg03s10-in-f14.1e100.net (142.251.36.78): icmp_seq=1 ttl=58 time=78.6 ms

--- google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 78.602/78.602/78.602/0.000 ms
ping: connect: Network is unreachable
[gio@aimecarc ~]$ 

Offline

#12 2024-12-17 08:08:24

seth
Member
Registered: 2012-09-03
Posts: 64,545

Re: [SOLVED] DNS resolver issues with NM & systemd-resolved

You can resolve google.com fine?
Maybe elaboate on what "I can't browse any website in internet" exactly means.
What browser, what "any website", what are the symptoms? Did you enable DoH or so in your browser?
Can you

curl -vL google.com > /dev/null

Offline

#13 2024-12-17 10:09:17

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 13,798

Re: [SOLVED] DNS resolver issues with NM & systemd-resolved


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#14 2024-12-17 12:22:58

-thc
Member
Registered: 2017-03-15
Posts: 905

Re: [SOLVED] DNS resolver issues with NM & systemd-resolved

So - your NetworkManager runs on defaults, your "/etc/resolv.conf" is created as a nonsense link on reboot and pointing to 127.0.0.53 (systemd-resolved) on NetworkManager restart. Weird.

How is your network interface configured inside NM? Have you set the DNS server yourself?

Offline

#15 2024-12-17 12:34:11

giorez
Member
Registered: 2024-04-17
Posts: 14

Re: [SOLVED] DNS resolver issues with NM & systemd-resolved

seth wrote:

You can resolve google.com fine?
Maybe elaboate on what "I can't browse any website in internet" exactly means.
What browser, what "any website", what are the symptoms? Did you enable DoH or so in your browser?
Can you

curl -vL google.com > /dev/null

I can now browse (with firefox) google.com, but until now I get a lot of timed out responses with firefox and gnome's web.

Enhanced Tracking Protection: Standard
DNS over HTTPS -> Status: Off

[gio@aimecarc ~]$ curl -vL google.com > /dev/null
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0* Host google.com:80 was resolved.
* IPv6: 2a00:1450:4001:81c::200e
* IPv4: 142.251.37.110
*   Trying [2a00:1450:4001:81c::200e]:80...
* Immediate connect fail for 2a00:1450:4001:81c::200e: Network is unreachable
*   Trying 142.251.37.110:80...
* Connected to google.com (142.251.37.110) port 80
* using HTTP/1.x
> GET / HTTP/1.1
> Host: google.com
> User-Agent: curl/8.11.1
> Accept: */*
> 
* Request completely sent off
< HTTP/1.1 301 Moved Permanently
< Location: http://www.google.com/
< Content-Type: text/html; charset=UTF-8
< Content-Security-Policy-Report-Only: object-src 'none';base-uri 'self';script-src 'nonce-VpwI4SX01X2RhXFUTP_SeQ' 'strict-dynamic' 'report-sample' 'unsafe-eval' 'unsafe-inline' https: http:;report-uri https://csp.withgoogle.com/csp/gws/other-hp
< Date: Tue, 17 Dec 2024 12:25:06 GMT
< Expires: Thu, 16 Jan 2025 12:25:06 GMT
< Cache-Control: public, max-age=2592000
< Server: gws
< Content-Length: 219
< X-XSS-Protection: 0
< X-Frame-Options: SAMEORIGIN
* Ignoring the response-body
* setting size while ignoring
< 
100   219  100   219    0     0    877      0 --:--:-- --:--:-- --:--:--   879
* Connection #0 to host google.com left intact
* Issue another request to this URL: 'http://www.google.com/'
* Host www.google.com:80 was resolved.
* IPv6: 2a00:1450:4001:827::2004
* IPv4: 142.250.186.36
*   Trying [2a00:1450:4001:827::2004]:80...
* Immediate connect fail for 2a00:1450:4001:827::2004: Network is unreachable
*   Trying 142.250.186.36:80...
* Connected to www.google.com (142.250.186.36) port 80
* using HTTP/1.x
> GET / HTTP/1.1
> Host: www.google.com
> User-Agent: curl/8.11.1
> Accept: */*
> 
* Request completely sent off
< HTTP/1.1 200 OK
< Date: Tue, 17 Dec 2024 12:25:07 GMT
< Expires: -1
< Cache-Control: private, max-age=0
< Content-Type: text/html; charset=ISO-8859-1
< Content-Security-Policy-Report-Only: object-src 'none';base-uri 'self';script-src 'nonce-sG3wcbsApajkTb-iE0tMDg' 'strict-dynamic' 'report-sample' 'unsafe-eval' 'unsafe-inline' https: http:;report-uri https://csp.withgoogle.com/csp/gws/other-hp
< Server: gws
< X-XSS-Protection: 0
< X-Frame-Options: SAMEORIGIN
< Set-Cookie: AEC=AZ6Zc-XbermHAy8HSwnm11fTqVc4aBIdWnXh7cC24C-BtN2BmejX1YgWSPM; expires=Sun, 15-Jun-2025 12:25:07 GMT; path=/; domain=.google.com; Secure; HttpOnly; SameSite=lax
< Accept-Ranges: none
< Vary: Accept-Encoding
< Transfer-Encoding: chunked
< 
{ [3435 bytes data]
100 19549    0 19549    0     0  38761      0 --:--:-- --:--:-- --:--:-- 38761
* Connection #1 to host www.google.com left intact
[gio@aimecarc ~]$ 

Last edited by giorez (2024-12-17 12:40:43)

Offline

#16 2024-12-17 12:38:14

giorez
Member
Registered: 2024-04-17
Posts: 14

Re: [SOLVED] DNS resolver issues with NM & systemd-resolved

-thc wrote:

So - your NetworkManager runs on defaults, your "/etc/resolv.conf" is created as a nonsense link on reboot and pointing to 127.0.0.53 (systemd-resolved) on NetworkManager restart. Weird.

How is your network interface configured inside NM? Have you set the DNS server yourself?

ipv4 method Auto (dhcp)
dns Auto
routes Auto

ipv6 method Auto
dns Auto
routes Auto

no custom DNS on machine nor on router running openwrt

Sometimes I switch the machine to fixed IP for flashing firmware on router i.e., but than I switch back to Auto (dhcp). Could be these swicthes be responsable of my issues?

Last edited by giorez (2024-12-17 12:51:01)

Offline

#17 2024-12-17 12:56:38

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,842
Website

Re: [SOLVED] DNS resolver issues with NM & systemd-resolved

giorez wrote:

A) if I remove '/etc/resolv.conf' and reboot, a new symlink '/etc/resolv.conf' to nowhere is created

I do not believe you. That is not possible. Deleted symlinks do not re-create themselves on reboot unless you have specifically configured them to do so with tmpfiles.d(5) or some other mechanism.

How exactly did you attempt to "remove '/etc/resolv.conf'"? What was the exact command? Are there any files under /etc/tmpfiles.d/ that might be re-creating the symlink?


Jin, Jîyan, Azadî

Offline

#18 2024-12-17 14:51:34

seth
Member
Registered: 2012-09-03
Posts: 64,545

Re: [SOLVED] DNS resolver issues with NM & systemd-resolved

I can now browse (with firefox) google.com, but until now I get a lot of timed out responses with firefox and gnome's web.

So basically we don't know at all whether this is DNS related - we've certainly not seen any proof of that (other than the resolv.conf fuck-a-rounds)

https://wiki.archlinux.org/title/Networ … NS_servers
Set those to 8.8.8.8, 1.1.1.1 and 9.9.9.9 to see whether maybe you're relying on some underdimensioned and uncached ISP DNS behind your router.

Offline

#19 2024-12-17 17:36:04

giorez
Member
Registered: 2024-04-17
Posts: 14

Re: [SOLVED] DNS resolver issues with NM & systemd-resolved

Head_on_a_Stick wrote:
giorez wrote:

A) if I remove '/etc/resolv.conf' and reboot, a new symlink '/etc/resolv.conf' to nowhere is created

I do not believe you. That is not possible. Deleted symlinks do not re-create themselves on reboot unless you have specifically configured them to do so with tmpfiles.d(5) or some other mechanism.

How exactly did you attempt to "remove '/etc/resolv.conf'"? What was the exact command? Are there any files under /etc/tmpfiles.d/ that might be re-creating the symlink?

do you believe in god?! ahahaha.
here are the feedback

[gio@aimecarc ~]$ sudo rm resolv.conf

[gio@aimecarc ~]$ ls -a /etc/tmpfiles.d/
.  ..

Offline

#20 2024-12-17 17:38:26

giorez
Member
Registered: 2024-04-17
Posts: 14

Re: [SOLVED] DNS resolver issues with NM & systemd-resolved

seth wrote:

I can now browse (with firefox) google.com, but until now I get a lot of timed out responses with firefox and gnome's web.

So basically we don't know at all whether this is DNS related - we've certainly not seen any proof of that (other than the resolv.conf fuck-a-rounds)

https://wiki.archlinux.org/title/Networ … NS_servers
Set those to 8.8.8.8, 1.1.1.1 and 9.9.9.9 to see whether maybe you're relying on some underdimensioned and uncached ISP DNS behind your router.

I really appreciated all the support from everybody. At the moment the issue seem to be solved. I'll be back here in case I will have problems. Thanks.

P.S. I tryed to mark this thread as SOLVED, but I can't see any place to edit title. sorry

Last edited by giorez (2024-12-17 17:44:45)

Offline

#21 2024-12-17 20:26:26

seth
Member
Registered: 2012-09-03
Posts: 64,545

Re: [SOLVED] DNS resolver issues with NM & systemd-resolved

Mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Edit: you just click the edit link in that post. You'll be able to edit the subject there as well.

Last edited by seth (2024-12-17 20:26:58)

Offline

Board footer

Powered by FluxBB