Re: Populating IPv6 DNS addresses in resolv.conf

2023-11-01 Thread Max Nikulin

On 01/11/2023 17:41, Timothy M Butterworth wrote:

All,

Thanks for all your help. I was able to get it mostly working:

# Generated by NetworkManager
search home.arpa
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 192.168.104.233
# NOTE: the libc resolver may not support more than 3 nameservers.
# The nameservers listed below may not be recognized.
nameserver 2001:4860:4860::
nameserver 2001:4860:4860::8844
nameserver 2600:380:bc53:b864::b3

I did not want the DNS name servers to be populated but I can live with it.


Do you mean that you prefer to avoid 192.168.104.233 
2600:380:bc53:b864::b3 received from DHCP?


Perhaps the 3 servers limitation may be relieved by allowing 
NetworkManager to run dnsmasq.





Re: Populating IPv6 DNS addresses in resolv.conf

2023-11-01 Thread Timothy M Butterworth
All,

Thanks for all your help. I was able to get it mostly working:

# Generated by NetworkManager
search home.arpa
nameserver 8.8.8.8
nameserver 8.8.4.4
nameserver 192.168.104.233
# NOTE: the libc resolver may not support more than 3 nameservers.
# The nameservers listed below may not be recognized.
nameserver 2001:4860:4860::
nameserver 2001:4860:4860::8844
nameserver 2600:380:bc53:b864::b3

I did not want the DNS name servers to be populated but I can live with it.

thank again for your help

Tim


-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀


Re: Populating IPv6 DNS addresses in resolv.conf

2023-10-31 Thread Max Nikulin

On 30/10/2023 20:04, Timothy M Butterworth wrote:

sudo less /etc/NetworkManager/system-connections/Pixel5.nmconnection

[...]

[ipv6]
addr-gen-mode=stable-privacy
dns=2001:4860:4860::,2001:4860:4860::8844;
dns-search=home.arpa;
ignore-auto-dns=true #I tried with this on, commented out and set to false
may-fail=false
method=auto


I have tried to add a DNS server through GUI. The result is

[ipv6]
addr-gen-mode=stable-privacy
dns=2001:4860:4860::;
method=auto

Disconnect and connect again.

cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 10.0.2.3
nameserver 2001:4860:4860::

It is a qemu VM, it gets DHCPv4 lease, but not DHCPv6 one. I have not 
tried to customize /etc/dhclient. Another data point with manually added 
IPv6 DNS server is Pocket's message

https://lists.debian.org/msgid-search/94ff954f-7d28-4a86-bdea-bd2c82196...@columbus.rr.com



Re: Populating IPv6 DNS addresses in resolv.conf

2023-10-30 Thread Max Nikulin

On 31/10/2023 04:02, Pocket wrote:

On 10/30/23 15:50, Timothy M Butterworth wrote:


I know it is using dhclient because I typod the domain name supersede 
domain-name "home.apra"; and it populated .apra in resolv.conf.


Sorry, it is not clear for me what did you do and what result you got. 
There is a script that may run ifupdown hooks:

/etc/NetworkManager/dispatcher.d/01-ifupdown
I hope, dhclient settings do not conflict with NetworkManager connection 
properties.



/etc/NetworkManager/NetworkManager.conf (lib: no-mac-addr-change.conf)

[main]
# rc-manager=
# auth-polkit=true
# dhcp=internal

^^

This states that you are running two DHCP clients as I suspected.


I would not be so sure. Notice "[ifupdown] managed=false". It is better 
to have a look into "ps axuwwf" for DHCP-related stuff (dhclient, 
udhcpcd). I hope, systemd-networkd does not try to manage interfaces


networkctl

should report "unmanaged". I assume that NetworkManager uses its 
internal DHCP client and it is OK.


Timothy, are you sure that "Pixel5" sends a DHCP lease? I have almost no 
experience with IPv6. I would try other methods for IPv6. I hope,


nmcli connection show Pixel5

may shed more light on IPv6 configuration state. Finally, do not neglect 
"journalctl -b" messages (even though I find NetworkManager log messages 
rather noisy).





Re: Populating IPv6 DNS addresses in resolv.conf

2023-10-30 Thread Pocket


On 10/30/23 15:50, Timothy M Butterworth wrote:



On Mon, Oct 30, 2023 at 1:18 PM Pocket  wrote:


On 10/30/23 09:04, Timothy M Butterworth wrote:

Hello All,

I have been following the recent emails regarding resolv.conf. I
almost have my system running perfectly. The only thing I am
missing is the population of IPv6 DNS addresses.

sudo less /etc/dhcp/dhclient.conf
supersede domain-name "home.arpa";
supersede dhcp6.domain-search "home.arpa";
supersede dhcp6.name-servers 2001:4860:4860::,
2001:4860:4860::8844;
supersede domain-name-servers 8.8.8.8, 8.8.4.4;

sudo less /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[global-dns]
searches=home.arpa

sudo less /etc/NetworkManager/system-connections/Pixel5.nmconnection

[ipv4]
dns=8.8.4.4,8.8.8.8;
dns-search=home.arpa;
ignore-auto-dns=true #I tried with this on, commented out and set
to false
may-fail=false
method=auto

[ipv6]
addr-gen-mode=stable-privacy
dns=2001:4860:4860::,2001:4860:4860::8844;
dns-search=home.arpa;
ignore-auto-dns=true #I tried with this on, commented out and set
to false
may-fail=false
method=auto

sudo less /etc/resolv.conf
domain home.arpa
search home.arpa
nameserver 8.8.8.8
nameserver 8.8.4.4

For some reason I am not getting any IPv6 Name Servers populated.

Any thoughts are appreciated.

Tim



Why not use NetworkManagers internal DHCP client.

That is what I have done and then I don't need dhclient or dhcpcd.

I am not sure that you are really using dhclient as NetworkManager
has not been set to use dhclient from the configuration that you
have posted.


I know it is using dhclient because I typod the domain name supersede 
domain-name "home.apra"; and it populated .apra in resolv.conf.


What is the output from:

NetworkManager --print-config

Notice in the following dhcp=internal in my configuration

NetworkManager --print-config


sudo NetworkManager --print-config
# NetworkManager configuration: 
/etc/NetworkManager/NetworkManager.conf (lib: no-mac-addr-change.conf)


[main]
# rc-manager=
# auth-polkit=true
# dhcp=internal


^^

This states that you are running two DHCP clients as I suspected.

That is probably why you have the results you have.


From the docs page: 
https://networkmanager.dev/docs/api/latest/NetworkManager.conf.html


||




This key sets up what DHCP client NetworkManager will use. Allowed 
values are |dhclient|, |dhcpcd|, and |internal|. The |dhclient| and 
|dhcpcd| options require the indicated clients to be installed. The 
|internal| option uses a built-in DHCP client which is not currently as 
featureful as the external clients.


If this key is missing, it defaults to |internal|. If the chosen plugin 
is not available, clients are looked for in this order: |dhclient|, 
|dhcpcd|, |internal|.


The commented entries are the defaults if not explicitly set

--

It's not easy to be me


Re: Populating IPv6 DNS addresses in resolv.conf

2023-10-30 Thread Timothy M Butterworth
On Mon, Oct 30, 2023 at 1:18 PM Pocket  wrote:

>
> On 10/30/23 09:04, Timothy M Butterworth wrote:
>
> Hello All,
>
> I have been following the recent emails regarding resolv.conf. I almost
> have my system running perfectly. The only thing I am missing is the
> population of IPv6 DNS addresses.
>
> sudo less /etc/dhcp/dhclient.conf
> supersede domain-name "home.arpa";
> supersede dhcp6.domain-search "home.arpa";
> supersede dhcp6.name-servers 2001:4860:4860::, 2001:4860:4860::8844;
> supersede domain-name-servers 8.8.8.8, 8.8.4.4;
>
> sudo less /etc/NetworkManager/NetworkManager.conf
> [main]
> plugins=ifupdown,keyfile
>
> [ifupdown]
> managed=false
>
> [global-dns]
> searches=home.arpa
>
> sudo less /etc/NetworkManager/system-connections/Pixel5.nmconnection
>
> [ipv4]
> dns=8.8.4.4,8.8.8.8;
> dns-search=home.arpa;
> ignore-auto-dns=true #I tried with this on, commented out and set to false
> may-fail=false
> method=auto
>
> [ipv6]
> addr-gen-mode=stable-privacy
> dns=2001:4860:4860::,2001:4860:4860::8844;
> dns-search=home.arpa;
> ignore-auto-dns=true #I tried with this on, commented out and set to false
> may-fail=false
> method=auto
>
> sudo less /etc/resolv.conf
> domain home.arpa
> search home.arpa
> nameserver 8.8.8.8
> nameserver 8.8.4.4
>
> For some reason I am not getting any IPv6 Name Servers populated.
>
> Any thoughts are appreciated.
>
> Tim
>
>
> Why not use NetworkManagers internal DHCP client.
>
> That is what I have done and then I don't need dhclient or dhcpcd.
>
> I am not sure that you are really using dhclient as NetworkManager has not
> been set to use dhclient from the configuration that you have posted.
>

I know it is using dhclient because I typod the domain name supersede
domain-name "home.apra"; and it populated .apra in resolv.conf.


> What is the output from:
>
> NetworkManager --print-config
>
> Notice in the following dhcp=internal in my configuration
>
> NetworkManager --print-config
>

sudo NetworkManager --print-config
# NetworkManager configuration: /etc/NetworkManager/NetworkManager.conf
(lib: no-mac-addr-change.conf)

[main]
# rc-manager=
# auth-polkit=true
# dhcp=internal
# iwd-config-path=
plugins=ifupdown,keyfile
configure-and-quit=no

[global-dns]
searches=home.arpa

[ifupdown]
managed=false

[logging]
# backend=journal
# audit=true

[device]
# wifi.backend=wpa_supplicant

[device-31-mac-addr-change]
match-device=driver:eagle_sdio,driver:wl
wifi.scan-rand-mac-address=no



> # NetworkManager configuration: /etc/NetworkManager/NetworkManager.conf
> (lib: no-mac-addr-change.conf)
>
> [main]
> # rc-manager=
> # auth-polkit=true
> # dhcp=internal
> # iwd-config-path=
> plugins=ifupdown,keyfile
> configure-and-quit=no
>
> [global-dns]
> options=ends0 trust-ad
>
> [ifupdown]
> managed=false
>
> [logging]
> # backend=journal
> # audit=true
>
> [device]
> # wifi.backend=wpa_supplicant
> wifi.scan-rand-mac-address=no
>
> [device-31-mac-addr-change]
> match-device=driver:eagle_sdio,driver:wl
> wifi.scan-rand-mac-address=no
>
> # no-auto-default file "/var/lib/NetworkManager/no-auto-default.state"--
>
> --
>
> It's not easy to be me
>
>

-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀


Re: Populating IPv6 DNS addresses in resolv.conf

2023-10-30 Thread Timothy M Butterworth
On Mon, Oct 30, 2023 at 11:09 AM Max Nikulin  wrote:

> On 30/10/2023 20:04, Timothy M Butterworth wrote:
> > sudo less /etc/resolv.conf
> > domain home.arpa
> > search home.arpa
> > nameserver 8.8.8.8
> > nameserver 8.8.4.4
>
> I do not see "# Generated by NetworkManager" here.
>
>  nmcli connection
>
NAMEUUID  TYPE  DEVICE
Pixel5  e70d426b-3a26-4b29-bf59-edb3dcdfdbc3  wifi  wlo1


>  nmcli device
>
DEVICE  TYPE  STATE   CONNECTION
wlo1wifi  connected   Pixel5



>  NetworkManager --print-config
>
sudo NetworkManager --print-config
# NetworkManager configuration: /etc/NetworkManager/NetworkManager.conf
(lib: no-mac-addr-change.conf)

[main]
# rc-manager=
# auth-polkit=true
# dhcp=internal # Am I correct in thinking that this setting enables the
internal DHCP client.
# iwd-config-path=
plugins=ifupdown,keyfile
configure-and-quit=no

[global-dns]
searches=home.arpa

[ifupdown]
managed=false

[logging]
# backend=journal
# audit=true

[device]
# wifi.backend=wpa_supplicant

[device-31-mac-addr-change]
match-device=driver:eagle_sdio,driver:wl
wifi.scan-rand-mac-address=no

# no-auto-default file "/var/lib/NetworkManager/no-auto-default.state"


>  ls -l /etc/resolv.conf
>
 lsattr /etc/resolv.conf
>

I just changed this back to using chattr +i with the IPv6 addresses added.



> As to /etc/dhcp/dhclient.conf and /etc/network/interfaces, I may be
> wrong, but perhaps independent instances for IPv4 and IPv6 may be
> running (if actual connection is managed through ifupdown)
>
>

-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀


Re: Populating IPv6 DNS addresses in resolv.conf

2023-10-30 Thread Pocket


On 10/30/23 09:04, Timothy M Butterworth wrote:

Hello All,

I have been following the recent emails regarding resolv.conf. I 
almost have my system running perfectly. The only thing I am missing 
is the population of IPv6 DNS addresses.


sudo less /etc/dhcp/dhclient.conf
supersede domain-name "home.arpa";
supersede dhcp6.domain-search "home.arpa";
supersede dhcp6.name-servers 2001:4860:4860::, 2001:4860:4860::8844;
supersede domain-name-servers 8.8.8.8, 8.8.4.4;

sudo less /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[global-dns]
searches=home.arpa

sudo less /etc/NetworkManager/system-connections/Pixel5.nmconnection

[ipv4]
dns=8.8.4.4,8.8.8.8;
dns-search=home.arpa;
ignore-auto-dns=true #I tried with this on, commented out and set to false
may-fail=false
method=auto

[ipv6]
addr-gen-mode=stable-privacy
dns=2001:4860:4860::,2001:4860:4860::8844;
dns-search=home.arpa;
ignore-auto-dns=true #I tried with this on, commented out and set to false
may-fail=false
method=auto

sudo less /etc/resolv.conf
domain home.arpa
search home.arpa
nameserver 8.8.8.8
nameserver 8.8.4.4

For some reason I am not getting any IPv6 Name Servers populated.

Any thoughts are appreciated.

Tim



Why not use NetworkManagers internal DHCP client.

That is what I have done and then I don't need dhclient or dhcpcd.

I am not sure that you are really using dhclient as NetworkManager has 
not been set to use dhclient from the configuration that you have posted.


What is the output from:

NetworkManager --print-config

Notice in the following dhcp=internal in my configuration

NetworkManager --print-config
# NetworkManager configuration: /etc/NetworkManager/NetworkManager.conf 
(lib: no-mac-addr-change.conf)


[main]
# rc-manager=
# auth-polkit=true
# dhcp=internal
# iwd-config-path=
plugins=ifupdown,keyfile
configure-and-quit=no

[global-dns]
options=ends0 trust-ad

[ifupdown]
managed=false

[logging]
# backend=journal
# audit=true

[device]
# wifi.backend=wpa_supplicant
wifi.scan-rand-mac-address=no

[device-31-mac-addr-change]
match-device=driver:eagle_sdio,driver:wl
wifi.scan-rand-mac-address=no

# no-auto-default file "/var/lib/NetworkManager/no-auto-default.state"--

--

It's not easy to be me


Re: Populating IPv6 DNS addresses in resolv.conf

2023-10-30 Thread Marco M.
Am 30.10.2023 um 22:08:46 Uhr schrieb Max Nikulin:

> On 30/10/2023 20:04, Timothy M Butterworth wrote:
> > sudo less /etc/resolv.conf
> > domain home.arpa
> > search home.arpa
> > nameserver 8.8.8.8
> > nameserver 8.8.4.4  
> 
> I do not see "# Generated by NetworkManager" here.

That is because NM manages the file. Some users use other managers
(resolvconf, systemd-resolve) or create the file manually.
The content of the file is relevant, which software created it is
secondary.



Re: Populating IPv6 DNS addresses in resolv.conf

2023-10-30 Thread Max Nikulin

On 30/10/2023 20:04, Timothy M Butterworth wrote:

sudo less /etc/resolv.conf
domain home.arpa
search home.arpa
nameserver 8.8.8.8
nameserver 8.8.4.4


I do not see "# Generated by NetworkManager" here.

nmcli connection
nmcli device
NetworkManager --print-config
ls -l /etc/resolv.conf
lsattr /etc/resolv.conf

As to /etc/dhcp/dhclient.conf and /etc/network/interfaces, I may be 
wrong, but perhaps independent instances for IPv4 and IPv6 may be 
running (if actual connection is managed through ifupdown)




Populating IPv6 DNS addresses in resolv.conf

2023-10-30 Thread Timothy M Butterworth
Hello All,

I have been following the recent emails regarding resolv.conf. I almost
have my system running perfectly. The only thing I am missing is the
population of IPv6 DNS addresses.

sudo less /etc/dhcp/dhclient.conf
supersede domain-name "home.arpa";
supersede dhcp6.domain-search "home.arpa";
supersede dhcp6.name-servers 2001:4860:4860::, 2001:4860:4860::8844;
supersede domain-name-servers 8.8.8.8, 8.8.4.4;

sudo less /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[global-dns]
searches=home.arpa

sudo less /etc/NetworkManager/system-connections/Pixel5.nmconnection

[ipv4]
dns=8.8.4.4,8.8.8.8;
dns-search=home.arpa;
ignore-auto-dns=true #I tried with this on, commented out and set to false
may-fail=false
method=auto

[ipv6]
addr-gen-mode=stable-privacy
dns=2001:4860:4860::,2001:4860:4860::8844;
dns-search=home.arpa;
ignore-auto-dns=true #I tried with this on, commented out and set to false
may-fail=false
method=auto

sudo less /etc/resolv.conf
domain home.arpa
search home.arpa
nameserver 8.8.8.8
nameserver 8.8.4.4

For some reason I am not getting any IPv6 Name Servers populated.

Any thoughts are appreciated.

Tim


-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org/
⠈⠳⣄⠀⠀