Assigning alt dns doesn't takes into affect [solved]


I'm trying to define alternative dns to be distributed to the clients on my lan, I tried configured it system -> wan -> advance settings -> unticked Use DNS servers advertised by peer and added one address per new box added. rebooted the router and went to which shows me the old dns.
I've also tried at system -> lan -> DHCP Server v4 -> advance settings -> DHCP-Options and added, saved + reboot, still shows my old dns.

what am I doing wrong?

Unencrypted DNS traffic may be intercepted and redirected.

Did you renew the lease of the client?

1 Like

You need a comma behind option 6.


Greetings, that was a typo in the original post, the actual string has comma, see:
root@router:/etc# grep dhcp_option config/dhcp | cut -f 3 -d ' ' | hexdump -C
00000000 27 36 2c 31 2e 31 2e 31 2e 31 2c 31 2e 30 2e 30 |'6,,1.0.0|
00000010 2e 31 27 0a |.1'.|

here is what I have in my config:
root@router:/etc# grep -r "" *
config/dhcp: list dhcp_option '6,,'
config/network: option dns ''

btw, one of my systems can't find machine names by name anymore, e.g. ping router returns no result but pinging the ip works.
can this be related to the change I've did?


yes, didn't made any affect


I understand, this can happen with my default dns too, I want to do it step by step, first move away from the the default dns, second, investigate of encrypted DNS traffic causes performance impact (I didn't found and info stating it doesn't) and if it doesn't then consider migrating to it.

ok, found the issue, my main server has a static /etc/resolv.conf which holds my router's ip.
that is why it didn't got changed.
on the other system, the same file is auto-generated t boot, that results with the alternative dns addresses.
but that system doesn't know now the hostnames on the network, I've tried to add the router's ip to the list (like on my desktop where it works) but still no match, is there a way to join the internet and local lan dnses?

Do you have a wan6 and a wan? Could it be your traffic is using wan6 interface? double check that. Also are you using any custom builds? or just default ones from openwrt?

Generally something this this:

should suffice.

to see what type of connection it uses by default (assuming you're using windows client)
open ping and does it show a x.x.x.x address or a xxx:xxx:xxx:xxx:xxxx: (longer form address)
example of a ipv6 address?


I'm using a wan connection, I have the above set and removed the entries from the lan interface and tried again, still shows my local dns, on the router, I'm seeing this:
root@router:~# nslookup

Address 1:
Address 2: 2a00:1450:4009:816::2004

looks like the router is the dns, the wan status entry shows the correct dns.
frankly, I don't understand why that site above still lists my dns as local, maybe it is the site itself?

ok, now I understand, that site shows my location based on the ip I have, e.g. local.
if I run a test, then it shows cloudfire as dns.

all good, thanks for the help!

1 Like

Why adding "6" before? Can I just put,

No you cannot just put the IPs. The number 6 refers to DHCP Option No. 6 - used to assign alternate DNS servers.

1 Like

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