Network Settings, pick the appropriate connection, Configure..., IPv6 Settings, Method Automatic (DHCP) addresses only, then enter the servers you want in the DNS servers: box. Actually, just setting 'Automatic (DHCP) addresses only' may be enough to make NM leave resolv.conf alone, thinking about it.
At least that's the canonical reply provided by Dan in similar circumstances, I believe.
After years of fiddling with chattr +i, I have finally accepted it. I would add to that canonical answer “Fix your DHCP server.” I did it and now I don't have to worry about it and my notebook works well anywhere (without my need to fiddle with chattr again). Also “A script in /etc/NetworkManager/dispatcher.d/ covers a multitude of sins.”
Comments
echo "nameserver 000.000.000.000" > /etc/resolv.conf
and
echo "nameserver 000.000.000.000 >> /etc/resolv.conf (for additional dns servers)
Note: replacing the 0s with your dns server.
That is a quick and easy way to do it, but I'm sure there is a more finesse answer out there.
Network Settings, pick the appropriate connection, Configure..., IPv6 Settings, Method Automatic (DHCP) addresses only, then enter the servers you want in the DNS servers: box. Actually, just setting 'Automatic (DHCP) addresses only' may be enough to make NM leave resolv.conf alone, thinking about it.
chattr +i /etc/resolv.conf
At least that's the canonical reply provided by Dan in similar circumstances, I believe.
After years of fiddling with
chattr +i, I have finally accepted it. I would add to that canonical answer “Fix your DHCP server.” I did it and now I don't have to worry about it and my notebook works well anywhere (without my need to fiddle with chattr again). Also “A script in/etc/NetworkManager/dispatcher.d/covers a multitude of sins.”PEERDNS=no
to set it on a interface/connection basis. Not sure if there's a global option to set this. Possibly in /etc/sysconfig/network might.