Aliases keep going stale / stop resolving

Started by sarkyscouser, Today at 09:08:12 AM

Previous topic - Next topic
Today at 09:08:12 AM Last Edit: Today at 09:13:17 AM by sarkyscouser
I've had this issue for a while now whereby aliases that were working all of a sudden go stale and stop resolving. I'm currently on 26.7.9_3 but this has been an issue for a while (months and several versions). Under System > Settings > General I have 9.9.9.9 & 1.1.1.2 configured as DNS servers.  Under Unbound DNS over TLS I have 4 NextDNS servers configured.  None of my network clients have any DNS issues.

I have attached a screenshot of the the alias table and firewall log, I can't see anything in the system log or unbound log that looks relevant.

If I clone the aliases in question (and make no other changes other than the name) they start working again. If I edit (make no changes), save and apply the aliases still won't resolve, only a clone brings them back to life. All of the URLs resolve fine in a browser.

What other details can I provide to help resolve this as it's driving me mad.

Lots of maximum retries exceeded.

How often does they list allow then to be redownloaded,

If you type the url in a web browser does it offer the download?
DEC740 > USW-Pro-8-PoE> U6-Enterprise
Dec670. Retired / backup device

Today at 09:29:34 AM #2 Last Edit: Today at 09:33:36 AM by sarkyscouser
They are all set to update once every 24 hours and all of the URLs download fine in a browser.

I am not exceeding any retry limits set by firehol etc, some of the lists are re-created hourly but I only update daily.

I'm getting this message just browsing GitHub this morning


Too many requests
You have exceeded a secondary rate limit.

Please wait a few minutes before you try again;
in some cases this may take up to an hour.
DEC740 > USW-Pro-8-PoE> U6-Enterprise
Dec670. Retired / backup device

Quote from: sarkyscouser on <strong>Today</strong> at 09:08:12 AMNone of my network clients have any DNS issues.

Do your clients all point their DNS to your OPNsense firewall?

Quote from: sarkyscouser on <strong>Today</strong> at 09:08:12 AMUnder Unbound DNS over TLS I have 4 NextDNS servers configured

If your clients are querying DNS on the firewall all their queries will be answered by your NextDNS servers.

Quote from: sarkyscouser on <strong>Today</strong> at 09:08:12 AMUnder System > Settings > General I have 9.9.9.9 & 1.1.1.2 configured as DNS servers

Why are you pointing OPNsense DNS queries to these DNS servers instead of to Unbound - If you remove the DNS server settings in General, OPNsense will querying DNS on localhost port 53 - is this the port Unbound is listening on?

Quote from: sarkyscouser on <strong>Today</strong> at 09:08:12 AMI have attached a screenshot of the the alias table and firewall log,

I use a number of block lists on my firewall, including FireHol Level 3 & Spamhaus DROP.

I have a purely IPv4 environment and I am not seeing any problems with the aliases updating, which are typically set to check every 4 hours.

If memory serves me, Github was experiencing issues accepting connections some time back - back then I never bothered to check if my aliases were updating.

I also block outbound connections from the firewall itself using these lists. Attached is an image of the firewall making connections to Github and being blocked due to Firehol Level 3. This isn't a problem in my environment due to the way the rules have been configured as the next server is queried when the connection fails with a reset.





This is the URL I use to retrieve for Firehol 3 tables: https://iplists.firehol.org/files/firehol_level3.netset

Your firewall logs suggest you have a common problem. Have you enabled logging in your outbound rules, including the Default block & Default pass rules whilst troubleshooting?

You could increase the frequency of the updates - every 4 hours is reasonable (6 checks per day).

What else is scheduled to run on your firewall at 11:30.

Do you have multiple WAN connections?

Post your rules for Firehol Level 3 and Spamhaus DROP with details how they've been configured, in case it is something with them.

Quote from: lmoore on <strong>Today</strong> at 10:34:14 AM
Quote from: sarkyscouser on <strong>Today</strong> at 09:08:12 AMNone of my network clients have any DNS issues.

Do your clients all point their DNS to your OPNsense firewall?  Mostly yes, those that stay on my lan/vlans.  For our phones which go on/off LAN use use android private DNS.  None of my LAN/vlan clients don't report any DNS issues, it's only these firewall aliases that seem to have problems.

Quote from: sarkyscouser on <strong>Today</strong> at 09:08:12 AMUnder Unbound DNS over TLS I have 4 NextDNS servers configured

If your clients are querying DNS on the firewall all their queries will be answered by your NextDNS servers. Yes.

Quote from: sarkyscouser on <strong>Today</strong> at 09:08:12 AMUnder System > Settings > General I have 9.9.9.9 & 1.1.1.2 configured as DNS servers

Why are you pointing OPNsense DNS queries to these DNS servers instead of to Unbound - If you remove the DNS server settings in General, OPNsense will querying DNS on localhost port 53 - is this the port Unbound is listening on? Yes unbound is listening on port 53, I have  the firewall set up to quad9 and cloudflare as a kind of fallback as I only have 1 DoT provider in unbound.  I don't mind opnsense querying quad9/CF for updates, aliases etc.  I don't think this creates as particular problem. But I will try removing the system DNS servers and see if that makes a difference. If there was a fundamental DNS problem the aliases wouldn't resolve at all including when first created.  What I'm seeing is they work fine for a period of time (weeks/months) then go stale and stop working.

What I will also try doing is using a domain override in Unbound DNS over TLS to quad9 or CF to github to see if that helps.

Quote from: sarkyscouser on <strong>Today</strong> at 09:08:12 AMI have attached a screenshot of the the alias table and firewall log,

I use a number of block lists on my firewall, including FireHol Level 3 & Spamhaus DROP.

I have a purely IPv4 environment and I am not seeing any problems with the aliases updating, which are typically set to check every 4 hours.

If memory serves me, Github was experiencing issues accepting connections some time back - back then I never bothered to check if my aliases were updating.

I also block outbound connections from the firewall itself using these lists. Attached is an image of the firewall making connections to Github and being blocked due to Firehol Level 3. This isn't a problem in my environment due to the way the rules have been configured as the next server is queried when the connection fails with a reset.

[images]

This is the URL I use to retrieve for Firehol 3 tables: https://iplists.firehol.org/files/firehol_level3.netset

Your firewall logs suggest you have a common problem. Have you enabled logging in your outbound rules, including the Default block & Default pass rules whilst troubleshooting? Yes outbound rule logging is enabled.

You could increase the frequency of the updates - every 4 hours is reasonable (6 checks per day). Will try that.

What else is scheduled to run on your firewall at 11:30. Nothing else is scheduled at that time, only alias updates which are set to 24 hours.

Do you have multiple WAN connections? No, just one dual stack WAN.

Post your rules for Firehol Level 3 and Spamhaus DROP with details how they've been configured, in case it is something with them.

Rules and an example of a specific rule attached below. I've had to upload these to dropbox and I can't see how to insert new images directly into this response.

https://www.dropbox.com/scl/fi/3uaij75ej626g6yjhdowf/rules1.png?rlkey=jfasva38rnkv1hsaap8tdzhdo&dl=0
https://www.dropbox.com/scl/fi/8ak8mkl8bqhmm1vsff7z0/rules2.png?rlkey=6e3t3m97u768wds2qs7m9v8wf&dl=0

Quote from: sarkyscouser on <strong>Today</strong> at 10:48:59 AMI can't see how to insert new images directly into this response.

Click the PREVIEW button and the area to click or drop files will become available under the composition box.


@sarkyscouser You don't appear to have any outbound rules on your WAN interface (YF) which would specifically block connections to any of the block lists, so it isn't going to be related to the rules you've listed.

With the rules blocking connections from IoT & LAN, I would suggest you change the Filter Action to Reject - see Firewall Rules Settings image. This will prevent your client connections hanging around waiting for a blocked connection to time out. By rejecting the connection they will know they can't reach the destination at that address and use another if the name resolves to multiple address.

Leave your WAN rules as Block, as you want to waste the time of the miscreant connections.

I've also attached notes I wrote when I configured Unbound to forward requests to Quad9's DNS servers which provide Threat-blocking with DNSSEC.

You may want to try these DNS settings in your environment to see if the behaviour changes. There are other settings outside of Unbound which affect DNS and these changes are in the notes too.

I HTH :)

@sarkyscouser To round off the firewall blocking, including on the WAN interface, I've attached the rules I'm using.


Thanks, I'll give all that a look.

I am blocking WAN inbound (incl firehol L1 on WAN inbound only) as well as LAN/IoT outbound, just that my screenshot only showed half of my rules. Interesting point about block vs reject on outbound, thanks.

I'm wondering whether it's simply an issue with queries to https://raw.githubusercontent.com/ based blocklists, I've switched all my firehol aliases to the https://iplists.firehol.org/files/firehol_level1.netset URL format and will increase the frequency to see if they update.  However now that I've changed the aliases, based on previous behaviour, they will likely work for a few weeks then stop again and any other changes I make now will either be in vain or be useful but I won't know that.

The Abuse IP DB block lists are also pointing at raw.githubusercontent.com URLs but don't seem to be affected though.

My GEOIP alias was also not updating but now has so maybe it could be some kind of system DNS vs Unbound issue.