[SOLVED] Disable RDNSS / DHCPv6-DNS

Hello,

I don't want to announce any DNS neither using RAs (RDNSS) nor DHCPv6 stateless, using odhcpd. However, if I don't set anything in /etc/config/dhcp it will always send the router's IPv6 address as DNS. I can also see this from Linux using rdisc6.

This is my config:

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '1'
        option rebind_localhost '1'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.auto'
        option localservice '1'

config dhcp 'lan'
        option interface 'wan'
        option ignore '1'
        option ra 'server'
        option ra_default '1'
        option ra_management '0'
        option ra_dns '0'
#        list dns '::1'
#       list domain '::1'

config odhcpd 'odhcpd'
        option maindhcp '0'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'

I've read so far that it is not possible to set the O-bit to zero (it is always on by default, even if M-flag is set to 0; i.e. M=0, O=1). But that shouldn't be a problem since I didn't setup DHCPv6 for the interface anyways. And even though I set "option ra_dns '0'", I still see RDNSS information in the router advertisements.

Only workaround seems to be to set "list dns" to something like "::1". I really don't want any DNS to be published. Just IPv6 address and default gateway using SLAAC.

1 Like

If you don't need it, you shouldn't care about it.
Just configure DNS-setting on the client manually and ignore DHCP-pushed DNS-servers.

I suppose, an unspecified address :: suits better.

1 Like

Manual configuration on every machine is very inconvenient and depending on the operating system maybe not even possible.

It seems, "option ra_dns" is only available in newer versions of odhcpd:

So unless I update odhcpd (I am running LEDE 17.01.6) I have to use the workaround, as it seems (or revert to using radvd? But that's not really an option, either).

EDIT: In the end I went to build the image completely from scratch. In the LEDE sources I adjusted the Makefile for odhcpd to fetch a newer version that includes the ra_dns option (I went for the commit from 15-May-2019). It works now.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.