Re: dhclient and ipv6 DNS Servers
Am Freitag, 17. Januar 2020, 11:12:07 CET schrieb Curt:
> On 2020-01-16, Rainer Dorsch <ml@bokomoko.de> wrote:
> > Am Mittwoch, 15. Januar 2020, 00:09:16 CET schrieb Pascal Hambourg:
> >> Le 14/01/2020 à 21:14, Rainer Dorsch a écrit :
> >> > 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.
> >>
> >> You may receive IPv6 DNS information from IPv6 Router Advertisements
> >> (RA) with rdnssd, not DHCPv6.
> >
> > Many thanks, Pascal, that explains the obervations :-)
> >
> > I have in /etc/network/interfaces
> >
> > iface eth0.1 inet6 auto
> >
> > dhcp 1
> > request_prefix 1
> >
> > I could not find a way to overwrite the DNS server for rdnssd, does
> > anybody
> > know if that is possible?
>
> All above and way beyond me, but from a cursory online examination of
> this affair it appears that beyond disabling rdnssd entirely, it's
> necessary to modify or patch the /etc/rdnssd/merge-hook script to
> prevent rdnssd from overwriting /etc/resolv.conf.
>
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=767071
>
> /etc/resolv.conf is handled by a configurable /etc/rdnssd/merge-hook
> script that users can modify to suit their needs. The stock version
> upstream has been modified to do what you want for ages:
>
> http://git.remlab.net/gitweb/?p=ndisc6.git;a=blob_plain;f=rdnssd/merge-hook
> .in;hb=f7bd3662d2292e248173721d4760c03df39df666
Many thanks for your response, Curt, that helped at least to hack an overwrite
to the ipv6 DNS server.
I do not understand what the upsteam does which Debian does not (also the bug
you are refering to is resolved!). Nevertheless, the merge-hook script is a
good place to look at.
As a quick fix I commented the line
#mv -f $resolvconf.tmp $resolvconf
This at least keeps rdnssd from overwriting the resolv.conf constantly.
I think a better solution would be to check if a e.g. DNS6 variable is defined
(e.g. in /etc/default/rdnssd) and if yes, ignore the content of
root@home:~# cat /var/run/rdnssd/resolv.conf
nameserver fe80::d263:b4ff:fe00:325c%eth0.7
nameserver fd38:81d3:9dac::1
nameserver fd22:c2e0:8eb2::1
root@home:~#
and use the content of the DNS6 variable instead.
Berni,
does that make sense or is there already another mechanism in place for
overwriting the (ipv6) DNS Server?
I think I could provide you a patch for the script, if that makes sense for
you to integrate in the Debian package.
Thanks
Rainer
--
Rainer Dorsch
http://bokomoko.de/
Reply to: