No internet access after setting DNSBL to "Unbound python mode"
-
Good day. Internet access was lost after setting DNSBL to "Unbound python mode". Please let me know what logs or settings to show, to help in diagnosis. These are the steps:
Firewall > pfBlockerNG > DNSBL
change from "Unbound mode" to "Unbound python mode"Firewall > pfBlockerNG > Update
Force option = "Reload"
Reload option = "All"Restarting pfsense did not solve the issue.
Services > "DNS Resolver" > "Python Module Module" is enabled:

-
@richardsago said in No internet access after setting DNSBL to "Unbound python mode":
Good day. Internet access was lost after setting DNSBL to "Unbound python mode". Please let me know what logs or settings to show, to help in diagnosis. These are the steps:
Firewall > pfBlockerNG > DNSBL
change from "Unbound mode" to "Unbound python mode"Firewall > pfBlockerNG > Update
Force option = "Reload"
Reload option = "All"Restarting pfsense did not solve the issue.
Services > "DNS Resolver" > "Python Module Module" is enabled:

Hi,
if pfblockerng is installed correctly there should be this entry:

-
@FireOdo said in No internet access after setting DNSBL to "Unbound python mode":
if pfblockerng is installed correctly there should be this entry:
added to that, if pfblockerng isn't installed, then this :

and would break unbound.
Let's fact heck :
The /var/unbound/unbound.conf config file, at the bottom :

It's there, or it isn't, both are ok.
If issues, one might check of the mentioned file, "pfb_unbound.py" actually exists in the /var/unbound/ folder.
This file is placed there when :
a) pfBlockerng is installed, and
b) "Unbound python mode" is selected.
c) and the last step, just to be sure : do a pfBlockerng force reload all.
edit : I'll add a d) : visit now the Unbound main settings page, and check that :

shows up. Save, and Apply.
@richardsago said in No internet access after setting DNSBL to "Unbound python mode":
change from "Unbound mode" to "Unbound python mode"
A bit strange, as "Unbound python mode" is 'default' for years now ... (when you use pfBlockerng).
Any messages in the System and resolver log when this happens ?
-
Thank you @FireOdo and @Gertjan for the replies. There is still no internet access after setting DNSBL to "Unbound python mode". Below are the screenshots after applying this change and restarting pfsense.
Set DNSBL Mode to "Unbound python mode"

Services > DNS Resolver > "Python Module Script" becomes pfb_unbound

pfb_unbound.py is in /var/unbound

Status > System Logs > General has this line about DNS servers not available

This is Status > System Logs > "DNS Resolver" entries before and after setting DNSBL to "Unbound python mode"

Please let me know where I went wrong or logs I need to provide. Thank you
Edited to add: forgot to mention that I restarted the client computers also but still same result
Edited to add: and I also ran Firewall > pfBlockerNG > Update > Reload All and restarted pfsense -
Your last image, the Resolver log.
At 12:05:47, it's process n° 17981 that starts.Starting shows about 7 lines. Stopping shows way more. Here is a complete stop start sequence (reverse order, so start from the bottom) :

edit : I presume default unbound log settings :

Now back to you Resolver log :
At 12:31:22, the unbound process number is 62026. But nothing is logged where the previous 17981 was stopped.
And minutes later, unbound was told to restart again : now it's process 78953.The last line, 12:38:51, unbound was running.
Or, in the system log, at 12:40:56, less then two minutes later : no DNS could be found = the resolver unbound wasn't available anymore.
Something is restarting unbound (and probably other process) very often.
The most obvious reason : your pfSense interfaces flap a lot = do down, then up, then down etc.
Your mission as an admin is : do everything in your power to stop that.These :

An internal Ethernet packet queue, the one for a NIC driver, and the OS, became full while collecting Ethernet traffic from "0.0.0.0" (this means all avaible NICs) port 53 (DNS). The process that normally gets these packers : unbound, but it wasn't there anymore, but DNS traffic kept on coming in.
Do you have a lot of (network) "link events" in the main system log ?
Normally, for a firewall / router, there should be close to none. -
Thank you @Gertjan for the reply. Sorry I forgot to mention that before I changed DNSBL to unbound python mode I needed to run Firewall > pfBlockerNG > Update > Reload All to apply the DNSBL Virtual IP that was needed when I upgraded to pfsense 2.9.0 yesterday. This is because it was already beyond the allowable maintenance time when I entered the Virtual IP yesterday and so I Reload All today and tested that it was working first (I think this is the 12:05:47 time) then made a vmware snapshot before applying DNSBL to unbound python mode (I think this is the 12:31:34). After restarting the client computers and they still have no internet I restarted pfsense (I think this is the 12:38:51) but the client computers still did not have internet.
I can't seem to find the unbound log level but I did not change the log level from default.
Please let me know how to identify (network) "link events" in the main system log. I think that's Status > System Logs > System > General but I don't know what strings to look for.
I reverted to the saved snapshot (DNSBL = Unbound mode) to make sure users have internet access, and restarted pfsense. But the message "WARNING: Could not check for system updates. DNS servers not available" also appeared once. There's also periodic message about gateway monitoring killed policy routing states appearing every 15 minutes
or sobut internet access is working. Below is part of the recurring message taken right after the last pfsense restart:

Edited to add: After reverting to the saved snapshot this is the last entry on Status > System > DNS Resolver:

-
Can you confirm :
It's a VM, right ?
Multi WAN ?@richardsago said in No internet access after setting DNSBL to "Unbound python mode":
monitoring killed policy routing states appearing every 15 minutes ...
You use scheduled firewall rules ? ( Firewall > Schedules )
Btw : you're last image shows a part of a second of the system log file.
Have a look at the entire file : /var/log/system.log with a text editor.I'm not sure what 'xinetd' does (now, I do), but if it restarts system services / process it won't be my friend.
-
Thank you @Gertjan for the reply. Yes it's a VM. It's multi-WAN (2 fiber internet). Some VLANs are failover from WAN1 to WAN2, some VLANs are failover from WAN2 to WAN1, some VLANs are assigned only to WAN2 (no failover)
There is only one schedule firewall rule in use and it's for one VLAN that restricts internet access based on time of the day and it was not active at the time of the screenshot
I'm not sure when the xinetd messages started appearing in the System Logs. I thought it was a normal part of pfsense operation. -
@richardsago said in No internet access after setting DNSBL to "Unbound python mode":
I thought it was a normal part of pfsense operation.
It is. It's part of FreeBSD. I guess I understand what it dioes, but of it's restarting processes all the time = read : it restarts unbound (and probably more, like nginx, kea etc etc) all the time, I've a totally not technically justified proposition to make : stop using scheduled firewall rules. Stop using auto WAN failover.
Just to see it this is what is creating your issue.
Start with a KIS compliant firewall, and when it work ok, only then you start adding gadgets, features etc.
Having a stable DNS on a firewall is, for me, pretty mandatory.
Sorry for not being able to give more precise advise. -
Thank you @Gertjan for the reply. On the original issue of this post, is there suggestions on how to fix losing internet access after setting DNSBL to "Unbound python mode"? I have tried doing this many times before and with the same result of losing internet access. But if I revert to "Unbound mode" the internet access returns.
-
@richardsago I have had this same issues for over a year and even tried doing a fresh install of pfSense with default settings. I was not able to get it resolved and haven't bothered to try again. I just leave in unbound mode.
-
Thank you @Raffi_ for the reply. I was thinking maybe it's somewhere in my firewall rules that work under unbound mode but will not work under unbound python mode.
-
@richardsago it could be that our issues are different. I hope you're able to figure it out.
-
What does "no Internet" mean? Can't ping by IP? By name? Is DNS responding? Diagnostics > DNS Lookup...?
How many times does "start of service" appear in the log?
FWIW, never had an issue switching methods. I just do it when I see it, on client routers.
If you are forwarding DNS to external servers, DNSSEC should be disabled.
-
Thank you @Raffi_ I hope so too. Thank you @SteveITS for the reply. I tested by browsing FQDN of companies like microsoft. pfsense DNS Resolver is the DNS used. DNS Resolver DNSSEC is enabled.
In the next available maintenance schedule I will additionally test ping by both IP and FQDN of microsoft and others, Diagnostics > DNS Lookup, and check how many times "start of service" will appear in the log.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginPrivacy Policy · Cookie Policy