[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bookworm: NetworkManager




On 10/21/23 14:53, Christoph Brinkhaus wrote:
Am Sat, Oct 21, 2023 at 02:40:49PM -0400 schrieb Pocket:
On 10/21/23 14:32, Stefan Monnier wrote:
I want NetworkManager to not over write /etc/resolv.conf
[...]
My setup is that I was a dhcp server to give out IPs and DNS info.
That way I can control those things without having to do so on every system.
Populating `/etc/resolv.conf` from the DHCP-provided info is a useful
part of "control those things without having to do so on every system",
so I don't see why you "want NetworkManager to not over write
/etc/resolv.conf".


          Stefan

I agree about that on most machines, but the machine in question has bind
running so nameserver needs to be set to 127.0.0.1 and the domain to
example.org in the resolv.conf file.

This is my problem in a nutshell
I am not 100% sure if I fully understood your setup. My system gets its
network settings via DHCP. I also run a nameserver on 127.0.0.1. My
external interface is bond0. I have the following configuration:

#v+
ris@lenovo ~> cat /etc/dhcp/dhclient.conf|grep -v "^#"

option rfc3442-classless-static-routes code 121 = array of unsigned
integer 8;

send host-name = gethostname();
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, domain-search, host-name,
dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn,
dhcp6.sntp-servers,
netbios-name-servers, netbios-scope,
interface-mtu,
rfc3442-classless-static-routes,
ntp-servers;

interface "bond0" {
	supersede domain-name-servers 127.0.0.1;
}
#v-

The last block prevents my local resolv.conf to be overwritten.
I am not sure if that measure could help in your setup.

Kind regards,
Christoph

Well the default minimal install that I do (or use, done,did,etc) has

networkmanager, isc-dhcp-client and wpa_supplicant, so that is the parameters that I have to work under.  I would like not to change that by removing or adding packages if I can.

As I understand this networkmanager has an internal dhcp client.

It can setup all the other parameters.

Which is ok and will for me if I can get it to leave /etc/resolv.conf alone.

This is what I am trying to accomplish.

Barring that I am gonna try to get it to put the following into resolv.conf if it just has to write  that file

and call it a day,week or month whatever it takes

domain example.org
nameserver 127.0.0.1
options edns0 trust-ad

--
It's not easy to be me


Reply to: