Hello #linux experts.
I am struggling with trying to stop my #Debian Trixie server from obtaining it's DNS resolver from DHCP.
I edit `/etc/resolv.conf` to use my preferred DNS resolver and I add `supersede domain-name-servers 192.168.1.2` to `/etc/dhcp/dhclient.conf` and then renew my DHCP lease, which results in the preferred DNS resolver being used for a while until `/etc/resolv.conf` is overwritten again. What am I doing wrong, please? Thank you!!
@pocketlint nmcli is a thing, networkmanager isn't tied to a gui
@pocketlint I use it on my headless Pi. Saves hacking at config files
@falken Thanks, I might well do that.
I wanted to keep things with as few moving parts as possible, hence my preference for messing with the config files on this Debian server, but I see the benefit of using NetworkManager.
Indeed, I used it recently on a different device to stop it obtaining DNS over DHCP and it worked very well.
BTW : I don't have a weird perversion for forcing devices not to use DHCP for DNS! I happened to need a script to change DNS resolver when roaming on a VPN...
@falken Thank-you. `which nmcli` shows nothing. It doesn't seem to be installed.