If you are going to mention other distros, NetworkManager can not work right 
sometimes for CentOS 7 and RHEL 7.  The information would be correctly entered 
in the /etc/sysconfig/network-script/ifcfg-XX file, but /etc/resolv.conf 
wouldn't be right.  This was about 1-2 years ago.  I don't run dhcp.  So this 
was for static IPs.  The solution then was to take fewer defaults for the 
possible entries in the NIC interface file.  And sometimes running auth-tui 
helped.    If you are running Ubuntu 18.04, the only way to get the search 
directive correct, if you are not using dhcp, is to create an 
/etc/netplan/XX.conf file.

-- 
Cathy L. Smith
IT Engineer

Pacific Northwest National Laboratory
Operated by Battelle for the 
U.S. Department of Energy

Phone: 509.375.2687
Fax:       509.375.4399
Email: cathy.sm...@pnnl.gov

-----Original Message-----
From: plug-boun...@pdxlinux.org <plug-boun...@pdxlinux.org> On Behalf Of Ben 
Koenig
Sent: Tuesday, March 12, 2019 7:40 PM
To: plug@pdxlinux.org
Subject: Re: [PLUG] Controlling resolv.conf...


On 3/12/19 4:17 PM, wes wrote:
> I recently struggled with this. It turns out, NetworkManager will only 
> modify /etc/resolv.conf if it is a symlink to /run/resolvconf/resolv.conf.
> If it's a regular file, regardless of its permissions, NM will not touch it.

/etc/resolv.conf is not symlinked on every distro, and is not even unique to 
linux. It is not a symlink on my system, and is being overwritten by 
NetworkManager. Fun fact:  The decisions of Canonical are not canonical.

>
> Other software probably still will, though, like dhclient.

Depends on how things are configured. /run/resolvconf/ is the state directory 
for resolvconf, and not tied specifically to NM.


As for the OP's question, there are a number of systems that handle 
configure DNS resolving, be it resolvconf, NetworkManager, WICD, or 
whatever that can do this. They are typically run on set schedules, such 
as at boot time (or when the user 'connects' to a network), and write to 
a file, such as /etc/resolv.conf.

Which network "service" are you using? I don't know what debian defaults 
do, but I would guess that it is NetworkManager. It usually is these 
days, but there are others.


I used to set my IP address in /etc/rc.d/rc.inet1.conf and then save my 
DNS servers in /etc/resolv.conf. Nothing would overwrite my changes, but 
that was before wifi and the millennial obsession with reinventing the 
init wheel.

> -wes
>
> On Tue, Mar 12, 2019 at 4:11 PM Ben Koenig <techkoe...@gmail.com> wrote:
>
>> Are you using NetworkManager?
>>
>> Last I checked NetworkManager will overwrite customizations to
>> /etc/resolv.conf.
>> One of my systems currently has the line:
>>
>> # Generated by NetworkManager
>>
>> at the top, so I add all my stuff through the designated utility.
>> Networkmanager should be the same everywhere, but I'm not on debian
>> so.... things might be different.
>>
>> On Mon, Mar 11, 2019 at 1:42 PM <mich...@robinson-west.com> wrote:
>>> I have Spectrum cable where the ethernet connection to the modem
>> receives a dynamic ip address from Spectrum along with wrong name servers.
>>> This is correct for resolv.conf:
>>> search roch.robinson-west.com
>>> nameserver 127.0.0.1
>>>
>>> resolv.conf get's overwritten though by the modem...
>>>
>>> I'm on a Debian Linux system. I need to ignore the nameserver settings
>> from Spectrum and the Spectrum search line.
>>> Something called resolvconf will allow me to do this???
>>>
>>> Another thing I'm wondering about is what the proper firewall settings
>> are to allow clients on my RFC 1918 network to use
>>> the proxy on my server. I'm also wondering about the legality of sslbump
>> and what people who have deployed this can tell
>>> me about enabling https support in squid?
>>>
>>> Theoretically, I could have a list of https sites that are allowed and
>> disallow all others and not have a legal problem. With google pushing web
>> sites
>>> to go https, it's not just banks and credit unions using it anymore.
>> Even google search is https. Uge! This is a nightmare for anyone who wants
>> their
>>> Internet connection content filtered. Content filtering by it's very
>> nature requires a man in the middle. The https protocol is supposed to
>> guarantee
>>> that there isn't a man in the middle. Some countries evidently will
>> prosecute you if you filter https connections. If I'm a business owner or a
>> home owner
>>> running a network at home, what am I supposed to do?
>>> _______________________________________________
>>> PLUG mailing list
>>> PLUG@pdxlinux.org
>>> http://lists.pdxlinux.org/mailman/listinfo/plug
>> _______________________________________________
>> PLUG mailing list
>> PLUG@pdxlinux.org
>> http://lists.pdxlinux.org/mailman/listinfo/plug
>>
> _______________________________________________
> PLUG mailing list
> PLUG@pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
_______________________________________________
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug
_______________________________________________
PLUG mailing list
PLUG@pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug

Reply via email to