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

Re: dhclient and ipv6 DNS Servers



Am Dienstag, 14. Januar 2020, 21:14:26 CET schrieben Sie:
> Am Dienstag, 14. Januar 2020, 19:18:01 CET schrieb Greg Wooledge:
> > On Tue, Jan 14, 2020 at 12:12:03PM -0500, Bob Weber wrote:
> > > Just edit the file /etc/resolv.conf and make it immutable (chattr +i
> > > /etc/resolv.conf).  At least you will know what is in the file and that
> > > it
> > > can't be changed (mistakes and all).  I use this to keep chrome from
> > > changing the google-chrome-beta.list file every time it starts since I
> > > use
> > > the HTTPS/// option of  apt-cacher-ng to use https transfers outside my
> > > LAN.
> > 
> > That is one of the options given on the wiki page.
> > 
> > https://wiki.debian.org/resolv.conf
> > 
> > Be sure you work around bug #860928 if you use this approach.
> 
> Thank you for all the good replies to this thread.
> 
> prepend dhcp6.name-servers 2001:4860:4860::8888, 2001:4860:4860::8844;
> 
> avoids the error message, but has no visible effect I can see. The IPv6 DNS
> servers still do not show in resolv.conf.
> 
> Unfortunately,
> 
> root@home:~# cat /etc/dhcp/dhclient-enter-hooks.d/leave_my_resolv_conf_alone
> make_resolv_conf() { :; }
> root@home:~# ls -l
> /etc/dhcp/dhclient-enter-hooks.d/leave_my_resolv_conf_alone -rwxr-xr-x 1
> root root 26 Jan 14 20:59 /etc/dhcp/dhclient-enter-hooks.d/
> leave_my_resolv_conf_alone
> root@home:~#
> 
> does not stop the system to overwrite /etc/resolv.conf constantly.
> 
> Do I need to restart a service that the change takes effect?
> 
> I did an ifdown/ifup eth0.1 ...
> 

Another interesting datapoint, if I enable debug data, I get with 

prepend dhcp6.name-servers 2001:4860:4860::8888, 2001:4860:4860::8844;

in dhclient.conf

as debug data in /tmp/dhclient-script.debug

--------------------------
Tue Jan 14 22:40:15 CET 2020: entering /etc/dhcp/dhclient-exit-hooks.d, 
dumping variables.
reason='PREINIT'
interface='eth0.1'
--------------------------
Tue Jan 14 22:40:15 CET 2020: entering /etc/dhcp/dhclient-enter-hooks.d, 
dumping variables.
reason='BOUND'
interface='eth0.1'
new_ip_address='192.168.0.30'
new_network_number='192.168.0.0'
new_subnet_mask='255.255.255.0'
new_broadcast_address='192.168.0.255'
new_routers='192.168.0.1'
new_domain_name='bokomoko.de'
new_domain_name_servers='192.168.0.1'
new_ntp_servers='192.168.0.1'
new_dhcp6_name_servers='2001:4860:4860::8888 2001:4860:4860::8844'
old_ip_address='192.168.0.30'
old_network_number='192.168.0.0'
old_subnet_mask='255.255.255.0'
old_broadcast_address='192.168.0.255'
old_routers='192.168.0.1'
old_domain_name='bokomoko.de'
old_domain_name_servers='192.168.0.1'
old_ntp_servers='192.168.0.1'
old_dhcp6_name_servers='2001:4860:4860::8888 2001:4860:4860::8844'
--------------------------
Tue Jan 14 22:40:15 CET 2020: entering /etc/dhcp/dhclient-exit-hooks.d, 
dumping variables.
reason='BOUND'
interface='eth0.1'
new_ip_address='192.168.0.30'
new_network_number='192.168.0.0'
new_subnet_mask='255.255.255.0'
new_broadcast_address='192.168.0.255'
new_routers='192.168.0.1'
new_domain_name='bokomoko.de'
new_domain_name_servers='192.168.0.1'
new_ntp_servers='192.168.0.1'
new_dhcp6_name_servers='2001:4860:4860::8888 2001:4860:4860::8844'
old_ip_address='192.168.0.30'
old_network_number='192.168.0.0'
old_subnet_mask='255.255.255.0'
old_broadcast_address='192.168.0.255'
old_routers='192.168.0.1'
old_domain_name='bokomoko.de'
old_domain_name_servers='192.168.0.1'
old_ntp_servers='192.168.0.1'
old_dhcp6_name_servers='2001:4860:4860::8888 2001:4860:4860::8844'
--------------------------
Tue Jan 14 22:40:17 CET 2020: entering /etc/dhcp/dhclient-enter-hooks.d, 
dumping variables.
reason='PREINIT6'
interface='eth0.1'
--------------------------
Tue Jan 14 22:40:17 CET 2020: entering /etc/dhcp/dhclient-exit-hooks.d, 
dumping variables.
reason='PREINIT6'
interface='eth0.1'
--------------------------
Tue Jan 14 22:40:18 CET 2020: entering /etc/dhcp/dhclient-enter-hooks.d, 
dumping variables.
reason='REBIND6'
interface='eth0.1'
new_domain_name='bokomoko.de'
new_ip6_prefix='2a02:8070:898f:e4fc::/62'
new_dhcp6_name_servers='2001:4860:4860::8888 2001:4860:4860::8844 
fd00::e228:6dff:fe43:5776'
old_domain_name='bokomoko.de'
old_ip6_prefix='2a02:8070:898f:e4fc::/62'
old_dhcp6_name_servers='2001:4860:4860::8888 2001:4860:4860::8844 
fd00::e228:6dff:fe43:5776'
--------------------------
Tue Jan 14 22:40:18 CET 2020: entering /etc/dhcp/dhclient-exit-hooks.d, 
dumping variables.
reason='REBIND6'
interface='eth0.1'
new_domain_name='bokomoko.de'
new_ip6_prefix='2a02:8070:898f:e4fc::/62'
new_dhcp6_name_servers='2001:4860:4860::8888 2001:4860:4860::8844 
fd00::e228:6dff:fe43:5776'
old_domain_name='bokomoko.de'
old_ip6_prefix='2a02:8070:898f:e4fc::/62'
old_dhcp6_name_servers='2001:4860:4860::8888 2001:4860:4860::8844 
fd00::e228:6dff:fe43:5776'
--------------------------

But neither new_dhcp6_name_servers nor old_dhcp6_name_servers (which are 
identical) matches the content of resolv.conf:

root@home:~# cat /etc/resolv.conf
domain bokomoko.de
search bokomoko.de
nameserver fd38:81d3:9dac::1
nameserver fda0:18e7:afcf::1
nameserver 8.8.8.8
root@home:~# 


Does anybody know which tool sets these variables?

Thanks
Rainer

-- 
Rainer Dorsch
http://bokomoko.de/



Reply to: