Recent posts

#1
I wanted to offer a migration but at the same time we didn't know as it was a bit of an assumption.

Its documented here:

https://github.com/opnsense/docs/commit/10c01b996cb0b9ed3e12f5d09bef2b2fd2e22510
#2
It was already tested and it seems to do the trick. You can install it via this command in a root shell (if you are on the latest community version)

opnsense-patch https://github.com/opnsense/core/commit/58e3c06a683495254c2bbd4a00ef0613315324d3
#3
26.7, 26.10 Series / Re: Aliases keep going stale /...
Last post by lmoore - Today at 08:00:27 PM
Quote from: mooh on <strong>Today</strong> at 03:05:10 PMUnbound will only query locally configured DNS servers if it is explicitly configured to do so under "Services: Unbound DNS: Query Forwarding: Use System Nameservers"

I don't enable that option.

Consider the default configuration of OPNsense which has the DNS server options for Allow DNS server list to be overridden by DHCP/PPP on WAN enabled, the ISP supplied DNS will be used and the DNS servers listed under DNS servers will count for nought.

The problem @sarkyscouser is experiencing with the Aliases failing to update in OPNsense appears to be related to DNS. Also reported is that no problems are observed when accessing the URL's using a computer attached to the local network.

The configuration information provided thus far indicates the client computers will be obtaining IP addresses from DNS servers which OPNsense itself is not using - this opens the possibility of different behaviour being observed in OPNsense compared to the network clients.

Going back many years, the firewalls I was maintaining, FortiGate in this case (this would apply to other brands too), the devices would initially be configured by someone else who would set the DNS server on the FortiGate to use FortiNet's DNS servers. The network clients would be using DNS on the Windows AD controller, with Windows AD querying root servers, or more likely, a closer DNS server.

The FortiGate's would be configured with FQDN address entries and used in firewall rules. Occasionally, the user would be blocked connecting to some site that a firewall rule should allow. Tracking down the issue, it was found the firewall was resolving the name to a different address compared to what Active Directory obtained. Pointing the FortiGate's DNS to the internal DNS server resolved the problem.
#4
General Discussion / Re: DNS wildcards in Alias (Ho...
Last post by martinseener - Today at 07:51:20 PM
Hi OC,

thanks for the kind words!

"Upstream resolver" in that diagram just means "whatever actually answers the daemon's queries". It doesn't have to be external. The daemon has no cache and doesn't resolve anything recursively on its own. It forwards each query, reads the answer, adds the addresses to the pf table, and passes the answer back. So Unbound can stay your real recursive resolver. There are two ways to do that:

1. Daemon in front of Unbound, Unbound does the resolving ("all queries" mode)
This is what you described.
- In Services → Unbound DNS → General, move Unbound to port 5353, on Localhost only if you can.
- Let the daemon listen on port 53: 127.0.0.1:53 plus your interface addresses, e.g. 127.0.0.1:53,192.168.1.1:53.
- Set the daemon's upstream to 127.0.0.1:5353.

Unbound still does the full recursion, caching, DNSSEC and blocklists. Queries that don't match a pattern pass through unchanged.

The one downside: Unbound now sees every query as coming from 127.0.0.1, so per-client statistics and blocklist reports stop being useful. With AdGuard Home in front, AdGuard keeps the client addresses, and the chain is AdGuard → daemon → Unbound. Again, nothing external.

2. Unbound handles everything, only watched domains go through the daemon ("watched domains only" mode)
This is your second idea. In Services → Unbound DNS → Query Forwarding, add the watched domain (e.g. blob.core.windows.net) with server 127.0.0.1, port 5354. All other client queries never touch the plugin.

The catch: the daemon's upstream can't be this same Unbound, because Unbound would forward the query straight back to the daemon and loop. So in this mode only the watched domains use an outside resolver: your ISP's, a public one, or another resolver on your network. Also, Unbound caches CNAME targets separately. If a watched name has a CNAME pointing outside the watched domain (common with *.trafficmanager.net), later lookups of that target can bypass the daemon. Add those target domains as patterns too, or use option 1.

For exact names (no *), the daemon also resolves them itself, on start and before they expire. Those queries go to the same configured upstream, so in option 1 they go to Unbound as well.

If you want everything resolved locally with no outside resolver involved, option 1 is the way to go.

Hope this helps,

Best, Martin
#5
thank you for the update, I'll be happy if this will solve my problem!
#6
26.7, 26.10 Series / 26.7.10, unbound and Kea stati...
Last post by keeka - Today at 06:43:48 PM
I just upgraded to 26.7.10 and noticed change of behaviour with unbound resolving some local names (static dhcp hosts under Kea). I restored 26.7.9 as I was not in a position to look in to it further and forgot to check generated contents /var/unbound/host_entries.conf.
Unbound appears not to be picking up Kea subnet domain when it has been set explicitly in a subnet's DHCP domain option. Unbound will only resolve the respective hosts under the default domain.
#7
High availability / Re: Managing HA cluster via OP...
Last post by upscale4446 - Today at 04:57:26 PM
Hey,
anyone got some answers? :)
#8
General Discussion / Re: Virgin installation
Last post by Dunking - Today at 04:56:00 PM
Many thanks for the replies. I realise there is a big download button but then there is in another place. The norm seems to be heading to a simple download with is just an installer that downloads the proper stuff, so nice to know it's still old school here :)
#9
Zenarmor (Sensei) / Re: CPU spikes from Elasticsea...
Last post by mlenje - Today at 04:35:12 PM
Issue was fixed in 2.7.3
#10
26.7, 26.10 Series / Re: Aliases keep going stale /...
Last post by mooh - Today at 04:22:27 PM
I too lost track of DNS and resolver library long ago. That's why I looked it up. But thinking about it, sending queries to one name server until it fails is the way to build a good cache and responses from a cache should be the quickest.