0

I am not understanding why my pc wasn't able to resolve names until I manually deleted a stale nmcli device entry.


Description/steps:

ubuntu 22.04 desktop, which uses network-manager and systemd-resolved. I had a vpn installed, with "block connectivity outside of VPN" enabled. Was having connectivity issues (specifically failure to resolve any names i believe). I disabled the "killswitch" in the VPN app, and uninstalled the VPN, and rebooted.

I was able to ping multiple ip's (including my intended dns server address 1.1.1.1, and a current IP of google.com) But nslookup could not resolve any hostnames. I could successfully dig @1.1.1.1 google.com as well.

My limited understand suggested that if i had:

  • a valid interface ip addr with an IP on the expected subnet
  • a valid default ip route to an IP on that subnet,
  • and dns server of 1.1.1.1 in Network Manager
    • as shown on the NM gui - /etc/resolve.conf points to a server on localhost, systemd-resolvd
    • but note i see no 1.1.1.1 text anywhere in /etc/systemd/ before or after the fix

then this (dns) "should be working". Not so, obviously.

After some poking, i found a stale device in nmcli d, of type dummy and state connected which by it's name must have been created by the (now uninstalled) VPN app. In case it is significant, this entry was 2nd, below the correct/expected connected wifi device.

deleting this nmcli device caused dns (nslookup, and programs such as browser), to resume working(resolving). Specifically, from a fresh reboot I did nslookup ... (failed to resolve), then nmcli connection delete ..., then nslookup ... works. No other changes / logout / etc.


Question:

Where should I have known to look to understand that this stale nmcli connection was the issue / what other components are involved here? I might assume my problem is in lack of systemd-resolved knowledge, but where's the link to the erroneous nmcli d entry, and where is systemd-resolved configured by NM to use 1.1.1.1?

1 Answer 1

1

Even managed by systemd & NetworkManager you should be able to see the config with : sudo systemd-analyze cat-config systemd/resolved.conf where the /etc/systemd/resolved.conf contains the config to serve localhost on port 53. In this config you can use DOH (DNS over Https) or DOT (DNS over TLS).

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.