OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: Demusman on August 05, 2022, 02:36:45 AM

Title: DNS Servers not being used.
Post by: Demusman on August 05, 2022, 02:36:45 AM
Been running 22.7_4 for a couple days and i just noticed the configured DNS servers (google) aren't being used and the dhcp servers are.
Anyone else seeing this? Did I miss a setting somewhere?

Title: Re: DNS Servers not being used.
Post by: YipieKaie on August 05, 2022, 02:41:21 AM
Hello

Check SERVICES: UNBOUND DNS: QUERY FORWARDING
and click in Use System Nameservers

//Peter
Title: Re: DNS Servers not being used.
Post by: Demusman on August 05, 2022, 03:17:04 AM
Thanks but I already have that checked also.
Tried to uncheck, check and restart unbound for the hell of it but still no change.
Title: Re: DNS Servers not being used.
Post by: dinguz on August 05, 2022, 07:17:54 AM
Go to system:settings:general, and make sure the DNS server list is empty. Also on that page, make sure to unselect 'allow dns override by PPP/DHCP' and 'do not use local name servers'.
Title: Re: DNS Servers not being used.
Post by: Vexz on August 05, 2022, 08:53:11 AM
Works fine for me on 22.7_4.

Check your settings under Services > Unbound DNS > DNS over TLS.
Are there any entries and is "Use System Nameservers" checked or not?
Title: Re: DNS Servers not being used.
Post by: YipieKaie on August 05, 2022, 11:33:37 AM
Hi again

I also have >Allow DNS server list to be overridden by DHCP/PPP on WAN >(checkhed)

Works fine for me

//Peter
Title: Re: DNS Servers not being used.
Post by: Demusman on August 05, 2022, 12:12:42 PM
Quote from: dinguz on August 05, 2022, 07:17:54 AM
Go to system:settings:general, and make sure the DNS server list is empty. Also on that page, make sure to unselect 'allow dns override by PPP/DHCP' and 'do not use local name servers'.

If the server list is empty... how would it know which servers to use??
Title: Re: DNS Servers not being used.
Post by: Demusman on August 05, 2022, 12:14:47 PM
Quote from: Vexz on August 05, 2022, 08:53:11 AM
Works fine for me on 22.7_4.

Check your settings under Services > Unbound DNS > DNS over TLS.
Are there any entries and is "Use System Nameservers" checked or not?

I think you missed my second post but yes, it's checked and they're listed.

Title: Re: DNS Servers not being used.
Post by: Demusman on August 05, 2022, 12:16:25 PM
Quote from: YipieKaie on August 05, 2022, 11:33:37 AM
I also have >Allow DNS server list to be overridden by DHCP/PPP on WAN >(checkhed)

So then yours is working the exact opposite way it should.
You're saying you're telling OPNsense to use the dhcp dns and it's not??
Has to be a bug here then.

@franco
Are you aware of this?
Just for info, I did not upgrade but did a new install.
Maybe I'm not understanding this.
If I go to Interfaces/Overview/WAN, it shows the dhcp dns servers listed there.
Should that be the dhcp servers or the custom servers listed?
Title: Re: DNS Servers not being used.
Post by: Demusman on August 05, 2022, 12:24:06 PM
Just found this:
https://forum.opnsense.org/index.php?topic=21061.0

Must be the issue as I'm using WireGuard also.
Title: Re: DNS Servers not being used.
Post by: dinguz on August 05, 2022, 03:14:56 PM
Quote from: Demusman on August 05, 2022, 12:12:42 PM
If the server list is empty... how would it know which servers to use??

If you leave it empty, it uses the local unbound dns service, that's what you want, right?
Title: Re: DNS Servers not being used.
Post by: Demusman on August 05, 2022, 05:20:50 PM
Quote from: dinguz on August 05, 2022, 03:14:56 PM
Quote from: Demusman on August 05, 2022, 12:12:42 PM
If the server list is empty... how would it know which servers to use??

If you leave it empty, it uses the local unbound dns service, that's what you want, right?

If the server list is empty it uses your ISP's DNS servers, and no, that's exactly what I want to avoid.
That's the whole purpose of this thread.
Title: Re: DNS Servers not being used.
Post by: Raketenmeyer on August 05, 2022, 06:30:34 PM
Although I'm still on 22.1.10, it also doesn't work for me. The ISP DNS servers are used - ignoring my config (1.1.1.2/1.0.0.2). So maybe there is already an issue since v22.1.x.

Title: Re: DNS Servers not being used.
Post by: Demusman on August 05, 2022, 08:36:20 PM
Quote from: Raketenmeyer on August 05, 2022, 06:30:34 PM
Although I'm still on 22.1.10, it also doesn't work for me. The ISP DNS servers are used - ignoring my config (1.1.1.2/1.0.0.2). So maybe there is already an issue since v22.1.x.

Are you using WireGuard?
Funny thing is I don't have a DNS set in WireGuard and from that thread, it seems like that's what caused the problem.
How about you?
Title: Re: DNS Servers not being used.
Post by: Raketenmeyer on August 08, 2022, 10:11:51 AM
No, I'm not using wireguard on this system but OpenVPN.

I just found out that the configured global nameservers will be used if I enable either the checkbox "Use system namservers" on the Unbound DNS "query forwarding" page or the corresponding checkbox on the Unbound DNS "DNS over TLS" page.

Is that the desired/expected behavior?