Odhcp + unbound resolving router to public IP

Hi all!

I replaced dnsmasq with unbound and odhcp as described on https://github.com/amezin/openwrt-packages/blob/master/net/unbound/files/README.md#unbound-and-odhcpd . DNS works generally fine, but it resolves the local hostname of the router with both the LAN and the WAN address, which causes issues when trying to access luci, throwing "Rejected request from RFC1918 IP to public server address"

% nslookup openwrt.lan

Name:	openwrt.lan
Name:	openwrt.lan
Address: 91.XXX.XXX.XXX

What did I do wrong?
Thanks in advance!

Try disabling this option option add_wan_fqdn 0 in both Unb0.ound and DHCP UCI files. It works the same for Unbound and dnsmaq. With that, your external PTR RR should be unnamed or something from your ISP like d192-2-17-13.dynamic.example.net.

Purpose: IPv6 has long unintelligible numbers, ISP are free to rotate DHCPv6 assignments (virtually unlimited number space), and so ISP rarely fake consumer PTR now. These options help with traffic graphs and logs so you can understand what is printed.

1 Like