OPNsense Forum

English Forums => General Discussion => Topic started by: Mombro on March 03, 2024, 04:47:02 PM

Title: Unbound dns doesn't work at all
Post by: Mombro on March 03, 2024, 04:47:02 PM
Intro: I took a lot of screenshots as proof, but I can only upload 4 with a max. of 256kb. I hadn't thought such restrictions might exist here ...

Hi all,

I am experiencing some weird behaviour in my newly set up opnsense and need some help.

Background:
I have a lot of experience in networking, coming from an IT Security background and many years of penetration testing.
I want to say of myself that I understand how networking and routes work on layers 2 and 3 and 4.

My home network consists of:
What I have done so far:

I installed opnsense, configured the two gateways, formed a group for fail over, imported DHCP from omada, enabled dhcp. Up to that point, everything works nicely.

The IP addresses look like this:

The ipconfig on my computer looks like this, nothing manually set, everything comes from DHCP.

(image missing)

Now I wanted to remove the raspberry pi from the equation and enable dns in the opnsense. Here, I got stuck and the oddities begin, or became obvious:

When I do tracert 192.168.4.254, I see three hops:

When I do tracert on any other address, I get 1 hop straight to the target.
It is the same in a linux machine, by the way.

See attachment "tracert.png"


Second weird thing: the DNS port appears as filtered/unavailable in nmap.
(image missing)

Other ports on the firewall are open, e.g. 80.
(image missing)



If port 80 wasn't available, I couldn't configure the opnsense, anyway.
(image missing)


Third strange thing: When I try to manually set the DNS server in Windows via nslookup (nslookup google.com 192.168.4.254), I see this result in the firewall logs of opnsense.
(image missing)

I have no clue why it would show the WAN network IP, 192.168.178.3, as outgoing, and the LAN network IP, 192.168.4.254, as incoming, because the request never should have left the LAN network at all.

Now, you might be wondering if I made a mistake in the firewall rules, but I in fact did not do anything there yet. When I got stuck, I added the rule to allow port 53/UDP from anywhere, but I just added this because it didn't work.

See attachment "firewall rules.png".


Unbound does listen on port 53, I did not change anything in the config there.

(image missing)

When I go to the diagnostics, I see that the opnsense can itself perform DNS requests "to the internet" and get information.

(image missing)

The service is also running, it's not stopped or anything.

(image missing)

I have asked two colleagues whom I appreciate as keen IT experts, but none found an immediate error here of what I'm doing wrong, so I'm really looking forward to your replies! :-(

Thanks a lot in advance <3

Edit: so, the problem is: dns is not accessible from the LAN network. Dns does work, as the diagnostics show that the opnsense can resolve external domains, but the service is not reachable from other devices.
Title: Re: Unbound dns doesn't work at all
Post by: cookiemonster on March 03, 2024, 11:09:10 PM
I don't understand the actual problem yet. I think you say clients in the LAN aren't getting dns resolution from OPN. You should be able to see activity in the Unbound logs.
One thing I would suggest is to eliminate a problem with the gateways setup, to remove the falllback  router and run a single gateway, see if things work that way first.
Title: Re: Unbound dns doesn't work at all
Post by: Mombro on March 04, 2024, 07:29:59 AM
Hi,

I edited the topic post to reflect more clearly that the dns service is not reachable.

I will delete the gateway group and see if that helps or changes anything.
Title: Re: Unbound dns doesn't work at all
Post by: Mombro on March 04, 2024, 09:59:49 PM
Quote from: Mombro on March 04, 2024, 07:29:59 AM
Hi,

I edited the topic post to reflect more clearly that the dns service is not reachable.

I will delete the gateway group and see if that helps or changes anything.

Bro, what the heck ... I deleted the group, disabled the LTE WAN, and it works instantly.

I guess I gotta inspect that grouping a bit more and learn about it more <3
Title: Re: Unbound dns doesn't work at all
Post by: cookiemonster on March 04, 2024, 10:30:29 PM
Glad it saved you some hair pulling.