Ask Your Question

Add options to /etc/resolv.conf without disabling NetworkManager

asked 2017-05-08 16:22:13 -0500

ffreiheit gravatar image

updated 2017-05-20 11:29:25 -0500

I want to add an options line to /etc/resolv.conf. Something like options ndots:2 timeout:1 attempts:5. This is on a Fedora 25 workstation.

I'd still like NetworkManager to do its usual thing with updating nameserver info from DHCP info, etc; so I don't want to totally disable NetworkManager or lock /etc/resolv.conf from being changed.

edit retag flag offensive close merge delete



You need to look at the NetworkManage dnsmasq configuration options

aeperezt gravatar imageaeperezt ( 2017-05-08 18:15:59 -0500 )edit

dnsmasq: NetworkManager will run dnsmasq as a local caching nameserver, [...], and then update resolv.conf to point to the local nameserver.? That doesn't sound like it has anything to do with setting an options line in /etc/resolv.conf.

ffreiheit gravatar imageffreiheit ( 2017-05-08 18:35:01 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-05-09 14:41:25 -0500

andybe gravatar image

in /etc/sysconfig/network-scripts every device or wlan route got the entry PEERDNS=yes and IPV6_PEERDNS=yes

if you set this to "no" and resolv.conf will be note be written

or you set you dns servers and search domains directly in the "NetworkManager" profile for each "connection".

edit flag offensive delete link more


In other words: no way to tell NetworkManager to add an options line, so have to fall back to telling it not to update /etc/resolv.conf at all?

ffreiheit gravatar imageffreiheit ( 2017-05-19 23:14:58 -0500 )edit

Question Tools

1 follower


Asked: 2017-05-08 16:22:13 -0500

Seen: 1,122 times

Last updated: May 20 '17