Odhcpd + unbound problem

Hello i have problem with my configuration
I use only odhcpd for both ipv4 and ipv6

I can resolve my router but not my local device as they respond NXDOMAIN with a nslookup from the router

Here the config

config unbound
	option dns64 '0'
	option edns_size '1280'
	option extended_luci '0'
	option hide_binddata '1'
	option listen_port '53'
	option manual_conf '0'
	option query_minimize '1'
	option root_age '9'
	option ttl_min '120'
	option validator '1'
	option validator_ntp '1'
	option rebind_localhost '1'
	option extended_stats '0'
	option add_wan_fqdn '0'
	option add_extra_dns '0'
	option localservice '1'
	option domain 'Ansuel-Network'
	option enabled '1'
	option dhcp_link 'odhcpd'
	option protocol 'ip6_prefer'
	option resource 'large'
	option recursion 'aggressive'
	option unbound_control '1'
	option rebind_protection '2'
	option domain_type 'transparent'
	option add_local_fqdn '2'
	list trigger_interface 'lan'
	list trigger_interface 'wan'


also as a secondary problem

I have a 192.168.2.0/23 subnet
And i have 2 dhcp / dns server (one on 192.168.2.1 and other on 192.168.3.1)
By adding forward dns the other router can't be resolved to the ip
(Example:
first router name: ansuel-router 192.168.2.1
second router name: no-lag-router 192.168.3.1
trying nslookup on 192.168.3.1 from 192.168.2.1 respond with a NXDOMAIN)

This is the configuration of unbound

forward-zone:
  name: .
  forward-addr: 1.0.0.1@853#cloudflare-dns.com
  forward-addr: 1.1.1.1@853#cloudflare-dns.com
  forward-addr: 2606:4700:4700::1001@853#cloudflare-dns.com
  forward-addr: 2606:4700:4700::1111@853#cloudflare-dns.com
  forward-addr: 192.168.2.1@53
  forward-first: no
  forward-tls-upstream: yes

That is the public root zone and then you got public DNS servers listed and expect them to resolve a host with a private LAN ip?


Is that local instance providing downstream TLS connectivity same as the mentioned public instances?

1 Like

Mh I don't think
Then how to include local resolution on another DNS server?
(How to link the 2 resolution and maintain the 2 DNS server?)

Also what about the first problem?

There is a glue script that reads the odhcp domain info and writes local-zone data for unbound.

If not mistaken the local-zones data should been written into /etc/unbound/unbound_ext.conf - you could check whether the LAN domain is there and in the correct format.

Zone transfer from one another. Maybe you would like to look into the details for Authority Zone Options in the unbound documentation.

ok i looks like something broke my dhcp config and reset odhcpd leasetrigger to default value instead of unbound script

i should report this to unbound luci app maintainer

config odhcpd 'odhcpd'
	option maindhcp '1'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/lib/unbound/odhcpd.sh'
	option loglevel '3'

leaetrigger was /usr/sbin/odhcpd-update so hosts were never added

Now i can succesfully ping and resolve local host between the 2 server

3 Likes

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