Server custom IPv6 dns server to some clients by dhcp

Hi!

I use option 66 of the IPv4 DHCP server to server a custom DNS server to some clients.

I don't want all clients to use this DNS Server, only a few.

My OpenWRT-Router ist running on 192.168.1.1 and fddd::1

My Adguard DNS Server is running on 192.168.1.240 and fddd::240

I serve the IPv4 DNS server to these clients like this:

/etc/config/dhcp

config tag 'adguard'
        option dhcp_option '6,192.168.1.240'

config host
        option name 'mac'
        option dns '1'
        option ip '192.168.1.14'
        option mac 'xx:xx:xx:xx:xx:xx'
        option tag 'adguard'

This works fine for IPv4.

But I can't make it work for IPv6.

Here ist what did NOT work:

config tag 'adguard'
        option dhcp_option '6,192.168.1.240'
        option dhcp_option '6,fddd::240'    # <- not working 
config host
        option name 'mac'
        option dns '1'
        option ip '192.168.1.14'
        option mac 'xx:xx:xx:xx:xx:xx'
        option tag 'adguard'
        option dns 'fddd:240'  # <- not working
config host
        option name 'mac'
        option dns '1'
        option ip '192.168.1.14'
        option mac 'xx:xx:xx:xx:xx:xx'
        option tag 'adguard'
        list dns 'fddd:240'  # <- not working

So my clients get these dns servers:

192.168.1.240 and fddd::1

So they use adguard when using IPv4 and openwrt router when using IPv6.

Any ideas?

Hi,

Were you lucky to resolve this?
Somewhere I found information that is required to create dedicated DHCP configuration, but neither worked for me...

config dhcp 'tagged_clients'
       option interface 'lan'
       option tag 'custom_dns_tag6'
       list dhcp_option '6,192.168.1.10' # custom DNS ipv4
       list dns 'fdaf:237b:....:85d' # custom DNS ipv6
       option ra 'server'
       option dhcpv6 'server'
       option ra_management '1'

... and later tag the client with ...

        list tag 'custom_dns6_tag'

... but didn't work.

Anyone, any advise?

Unfortunately no. But I have not tried it any more.