Strange DNS issue
Sam Varshavchik
mrsam at courier-mta.com
Fri Dec 5 02:16:15 UTC 2025
Alexander H. writes:
> cat /etc/resolv.conf
> # This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-
> resolved(8).
>
> nameserver 127.0.0.53
> options edns0 trust-ad
> search th.local
As I suspected, that's where dig looks for answers, instead of the two IP
addresses you think are your nameservers. Look closer, and you'll see that
your /etc/resolv.conf is a symlink:
$ ls -al /etc/resolv.conf
lrwxrwxrwx 1 root root 39 Dec 28 2023 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf
So, in this manner, your dig will try to get answers from this man-in-the-
middle virus called "systemd", that has been infecting various Linux
distributions recently, instead of your real nameservers. Sad to say that
Debian and Ubuntu fell prey to the virus. A real shame.
The usual solution to fixing any systemd-related brain damage is to work
around it. If you look closer, you should find that you also have a /run/
systemd/resolve/resolv.conf file, where I expect you'll find your real
nameservers, that you will recognize. Pointing your /etc/resolv.conf symlink
to it will not fully work around the systemd-related brain damage, but just
sufficiently to make dig happy.
You want to make sure you get this right:
cd /etc
ls -al ../run/systemd/resolve/resolv.conf /etc/resolv.conf
rm resolv.conf
ln -s ../run/systemd/resolve/resolv.conf /etc/resolv.conf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20251204/b617e960/attachment.sig>
More information about the ubuntu-users
mailing list