Use DNS servers advertised by peer

Dear community,

I configured "Use DNS servers advertised by peer" on the WAN interface, but my router still uses the localhost for name resolution:

root@OpenWrt:/etc/config# nslookup

Address 1:
Address 2: 2a00:1450:400d:808::200e

It seems dnsmasq is using the resolv.conf file, which contains:

search local
nameserver ::1

This is my dhcp config file:

config dnsmasq
        option domainneeded '1'
        option localise_queries '1'
        option expandhosts '1'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.d/'
        option ednspacket_max '1232'
        list server ''
        list server 'fe80::ba27:ebff:fe20:51a3'
        option rebind_protection '0'
        option sequential_ip '1'
        option localservice '0'
        option filterwin2k '1'
        option strictorder '1'
        option allservers '1'
        option local '/local/'
        option domain 'local'

config dhcp 'lan'
        option interface 'lan'
        option dhcpv6 'server'
        option dhcpv4 'server'
        option leasetime '24h'
        option limit '240'
        list dhcp_option '6,'
        list dhcp_option '15,local'
        option ra 'server'
        option ra_slaac '1'
        list ra_flags 'managed-config'
        list ra_flags 'other-config'
        option ra_management '1'
        option ra_default '1'
        list dns ''
        list dns 'fe80::ba27:ebff:fe20:51a3'
        option start '11'

config dhcp 'wan'
        option interface 'wan'
        option ignore '1'
        list dns ''
        list dns 'fe80::ba27:ebff:fe20:51a3'

config odhcpd 'odhcpd'
        option maindhcp '1'
        option leasefile '/tmp/hosts/odhcpd'
        option leasetrigger '/usr/sbin/odhcpd-update'
        option loglevel '4'

I set my local DNS servers in list server and list dns commands. How could I force using my configured DNS servers?


Check the output:

head -v -n -0 /etc/resolv.* /tmp/resolv.* /tmp/resolv.*/*

resolv.conf is used by the device itself.

Here you'll find the nameservers you have configured for upstream.


This is normal: "nslookup" asks the local "dnsmasq", which should ask the upstream nameservers.

To be sure, enable logging on "dnsmasq" and watch the queries on the log.