Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
24.7 Production Series
»
[Solved] DNS not working for opensense router itself
« previous
next »
Print
Pages: [
1
]
Author
Topic: [Solved] DNS not working for opensense router itself (Read 881 times)
Timonator
Newbie
Posts: 5
Karma: 0
[Solved] DNS not working for opensense router itself
«
on:
September 09, 2024, 10:09:25 pm »
Hi all,
First of, I just started with opnSense, so forgive me for any stupid question, I've searched around but can't quite find a topic with a similar issue.
I have installed opnSense on a seperate server with 2 LAN interfaces, 1 configured as WAN and 1 as LAN.
The WAN is setup with PPPoE and makes a succesful connection with the ISP (getting public IP)
The LAN is setup as IPv4 DHCP, which works fine.
My gateway IP is 18.8.88.1
It was my understanding that DNS servers would be setup under system>settings>general.
So I setup 2 servers 8.8.8.8 and 8.8.4.4
But when I check my clients the first DNS server they receive is 18.8.88.1 (which is the gateway) and second is 8.8.8.8, therefore they are not getting any DNSlookups and fail to connect to most of the internet.
The only way I was able to get my clients to connect is to head over to Services>ISC DHCPv4>[LAN] and enter the DNS servers there.
This way all my clients get the correct DNS servers, but it seems my gateway itself does not receive the correct DNS server, because it is not part of the LAN DHCP (I guess).
What is the correct way to setup DNS for all my devices in my configuration. I hope someone can steer me in the right direction. Thanks in advance.
«
Last Edit: September 12, 2024, 08:00:05 pm by Timonator
»
Logged
cookiemonster
Hero Member
Posts: 1823
Karma: 95
Re: DNS not working for opensense router itself
«
Reply #1 on:
September 09, 2024, 11:43:17 pm »
There are various places for a variety of setups so it can be confusing.
System > settings > general is mostly for OPN to use.
If you haven't yet, enable Unbound. That should take care of the setup.
Just one question. Do you want your clients to use your ISP DNS servers?
Logged
Timonator
Newbie
Posts: 5
Karma: 0
Re: DNS not working for opensense router itself
«
Reply #2 on:
September 10, 2024, 01:02:37 pm »
Unbound is enabled and enabled by default. But does not seem to be doing much.
Quote
Just one question. Do you want your clients to use your ISP DNS servers?
I tried this before with my mikrotik setup, but couldn't automatically receive the DNS servers from the ISP, therefore I am fine with using the Google DNS servers. I will get a pihole in place in the future, once everything is normally running.
Logged
cookiemonster
Hero Member
Posts: 1823
Karma: 95
Re: DNS not working for opensense router itself
«
Reply #3 on:
September 10, 2024, 06:28:41 pm »
If Unbound is enabled and not doing much (how do you measure it?) then either a misconfiguration on your network (i.e. some pi-hole running somewhere) or a quiet one
The help tooltips help, see attachment.
In ISC DHCPv4 at least, If you leave blank it will give the *system default dns servers*. That is what you set in your system > settings > general.
Otherwise this interface ip address if a dns service is enabled i.e. Unbound.
Best to test changes with a lease renewal from the client you are using to test.
Logged
Timonator
Newbie
Posts: 5
Karma: 0
Re: DNS not working for opensense router itself
«
Reply #4 on:
September 10, 2024, 10:37:34 pm »
So I did find a "rogue" pihole docker floating in my synology, I disabled that, but didn't change anything as it was still setup on my old 10.10.1.0/24.
I also decided to isolate the rest of my network by plugging my desktop directly in the LAN interface of opnSense. That did not help
So I put the DNS settings in the general tab and started to play with settings again. On my test devices I kept getting 18.8.88.1 as the first DNS server and 8.8.4.4, eventhough my first one set up was 8.8.8.8
Under Services>Unbound DNS>DNS over TLS, I checked the setting "Use System Nameservers", this seems to work. My test devices still receive 18.8.8.1 as the first dns, but somehow get translated to 8.8.8.8
So anyway, it seems all my clients work. Except opnSense itself.
When I try to synchronize the time, it won't work.
If I ping from opnSense -> 0.opnsense.pool.ntp.org -> no response
If I ping from opnSense -> 185.89.20.5 (one of the ip's behind NTP address) -> I get response
If I ping from desktop, I get a response from all. So for some reason opnSense is not talking to the DNS server itself.
Logged
Timonator
Newbie
Posts: 5
Karma: 0
Re: DNS not working for opensense router itself
«
Reply #5 on:
September 12, 2024, 07:59:50 pm »
All is solved and understood now I guess.
As my current install is 24.7.3, my Unbound DNS was enabled by default, this causes the first DNS server to be the gateway itself. When it is disabled I get the bare DNS servers set up in the System>Settings>General.
Thank you for the help and advice.
Logged
cookiemonster
Hero Member
Posts: 1823
Karma: 95
Re: [Solved] DNS not working for opensense router itself
«
Reply #6 on:
September 12, 2024, 10:57:50 pm »
Sorry was away with work. I'm glad you got to it.
If you fancy a read, there was something useful although I'm not sure how accurate is now
https://homenetworkguy.com/how-to/confused-about-dns-configuration-in-opnsense/
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
24.7 Production Series
»
[Solved] DNS not working for opensense router itself