OPNsense Forum

Archive => 19.1 Legacy Series => Topic started by: firewall on June 19, 2019, 03:35:17 am

Title: Unbound + DHCP
Post by: firewall on June 19, 2019, 03:35:17 am
From foot of Unbound "General" settings page:

"
If Unbound is enabled, the DHCP service (if enabled) will automatically serve the LAN IP address as a DNS server to DHCP clients so they will use Unbound resolver. If forwarding is enabled, Unbound will use the DNS servers entered in System: General setup or those obtained via DHCP or PPP on WAN if the "Allow DNS server list to be overridden by DHCP/PPP on WAN" is checked.
"

I'm sure there's a good explanation for why this is but I can't for the life of me figure it out.  Does this mean that DNS servers specified via DHCP server settings are ignored in favor of distributing LAN IP?  Why?

Title: Re: Unbound + DHCP
Post by: chemlud on June 19, 2019, 09:08:44 am
Because that's was a resolver (Unbound) does?

The second sentence ("If forwarding....") just reflects the fact that these servers in "General setup" or provided by ISP are ignored by Unbound, unless you use forwarding mode.
Title: Re: Unbound + DHCP
Post by: manjeet on June 21, 2019, 08:48:43 am
In a simple language:
1. when unbound is enabled and you do not specify dns servers in dhcp setting then by default it uses unbound dns of opnsense.
2.a. In unbound: In general / idle situation, It first try to resolve the query it self if it does not have the answer then it goes to the dns mentioned in option 5.
2.b. In unbound: In forwarding mode, it accepts the query and rather then resoling it, it just forward it to the dns server of options 5.

OPTION 5. : System -> settings -> general:
Any dns server mentioned here will resolve the query which is not resolved by unbound or forwarded by unbound. NOw dns here either you mention it manually or check opton "Allow DNS server list to be overridden by DHCP/PPP on WAN" which will overwrite the dns server mention manually with the ones provided by ISP.
Title: Re: Unbound + DHCP
Post by: firewall on July 11, 2019, 10:14:41 pm
In a simple language:
1. when unbound is enabled and you do not specify dns servers in dhcp setting then by default it uses unbound dns of opnsense.

emphasized text above is logical and is the desired behavior, however it is not how the text i quoted in my original question reads.  dns servers configured explicitly via dhcp settings should be served to clients--not overridden with lan ip address.