This is an automated archive made by the Lemmit Bot.

The original was posted on /r/selfhosted by /u/VE3VVS on 2024-07-26 14:10:03+00:00.


In the old days /etc/resolv.conf used to be cheap, and cheerful, put in your nameserver addresses and your domain search parms and you where done.

Now with the advent of NetworkManager, systemd-resolved, and now Tailscale, it’s a free for all opportunity for all three to fight for who over writes the /etc/resolv.conf file. I’m on Fedora 40, and for some time at least until Tailscale, to which I love dearly, came on scene, I had disabled systemd-resolved and unlinked /etc/resolv.conf from /run/systemd/resolv/resolv.conf and put my nameservers in NetworkManager, (192.168.0.200 192.168.0.183) and be done with it.

With tailscale and magic DNS, the rules ave all changed, and Tailscale overwites /etc/resolv.conf with nameserver 100.100.100.100

So let me explain as concise as I can my setup:

main locally hosted DNS at 192.168.0.200

secondary locally hosted DNS at 192.168.0.183

and of course magicdns at 100.100.100.100 which is needed as I refer to some service via talnet name.

I have tried to include to two locally hosted DNS in Tailscale DNS setup refering to them via the tailnet ip but that doesn’t seem to provide internet resolution for anything other than the tailnet, (even with the over write local setting switch applied)

I had tried including 100.100.100.100 in the list of forwarders in the locally hosted DNS but that has equally disappointing results, in as much as the tailnet does not resolv.

The only thing that seems to work as advertised is if, (by what ever means), the /etc/resolv.conf reads:

‘’’

nameserver 192.168.0.200

nameserver 192.168.0.183

nameserver 100.100.100.100

search example.net taildxxxx.ts.net

‘’’

Now I was reading last night, that Tailscale “play nice” with systemd-resolved.service, so I when about putting it back it play, but of course that wouldn’t go a simple as one would have hope in as much that even through I recreated the symlink sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf the symlink keep getting replaced with a regular file /etc/resolv.conf, either by Tailscale or NetworkManager.

Now I feel pretty stupid having to ask all this, as this “should” be all basic networking 101, so please be gentle and don’t down vote me too badly but I would really like to know the way everyone else is dealing with this “dogs breakfast”