[Novalug] NetworkManager clobbers resolv.conf

Roger Broseus RogerB@Bronord.com
Tue Aug 5 09:55:53 EDT 2014


Yes, I too found that network manager can accomplish defining fixed DNS IPs. It's a handy tool. I also use it to setup VPN connections. In which case I don't need static DNS IPs!
-- 
Roger Broseus
www.bronord.com

On August 5, 2014 12:56:55 AM EDT, Peter Larsen via Novalug <novalug@firemountain.net> wrote:
>On 08/04/2014 11:32 PM, W Alan Day wrote:
>> What settings in NetworkManager would cause it to update resolve.conf
>> properly?  Been playing around with different versions of the
>> /etc/network/interfaces file & NetworkManager has frequently cleared
>> all of the dns settings.  This, of course, causes the Internet to
>> become unavailable.
>
>/etc/resolv.conf is an important network file. It defines DNS/name
>resolution for your network. Since NetworkManager manages network
>connectivity it's pretty natural it would manage the content of
>/etc/resolv.conf too?
>
>Just set the network connection information in NetworkManager to use a
>static DNS server, and it'll configure the file accordingly. If you
>don't, it'll use the DHCP provided DNS IP address(es) - in both cases,
>NetworkManager will change /etc/resolv.conf to reflect this. This
>should
>be made very clear to you by this comment in the file:
>
>$ cat /etc/resolv.conf
># Generated by NetworkManager
>[.....]
>
>You can use the (in Fedora/Red Hat)
>/etc/sysconfig/network-scripts/ifcfg-eth* options too to
>control/override the DHCP provided DNS information. For instance
>DNS1=192.168.1.1 would set the nameserver=192.168.1.1
>
>Of course there is always the option of completely discarding
>NetworkManager and go back to manually managing all the network
>configuration files. Setting NM_CONTROLLED=no does that or of course
>uninstall it.
>>
>> Internet research led me to use: sudo chattr +i /etc/resolv.conf
>
>That seems to be the wrong solution. Not having a program trying to
>change a file you expect to be static would be the right solution?
>
>>
>> & this appears to have fixed the problem but would like to know what
>> settings in NetworkManager would set resolv.conf properly.
>
>I would drop NetworkManager if you are not using it. Or if you are
>configure it according to your need.
>
>>
>> System details: Raspberry Pi Linux pi 3.12.22+ #691 PREEMPT Wed Jun
>18
>> 18:29:58 BST 2014 armv6l although the problem predates the
>fist-upgrade.
>>
>>
>> _______________________________________________
>> Novalug mailing list
>> Novalug@calypso.tux.org
>> http://calypso.tux.org/mailman/listinfo/novalug




More information about the Novalug mailing list