Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    No internet access after setting DNSBL to "Unbound python mode"

    Scheduled Pinned Locked Moved pfBlockerNG
    15 Posts 5 Posters 772 Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      richardsago
      last edited by

      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:
      9e40734a-2c4a-448d-a889-522d668ed5f5-image.png

      FireOdoF 1 Reply Last reply
      Reply Quote 0
      • FireOdoF
        FireOdo @richardsago
        last edited by FireOdo

        @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:
        9e40734a-2c4a-448d-a889-522d668ed5f5-image.png

        Hi,

        if pfblockerng is installed correctly there should be this entry:

        pfb_python.png

        Kettop Mi4300YL CPU: i5-4300Y @ 1.60GHz RAM: 8GB Ethernet Ports: 4
        SSD: SanDisk pSSD-S2 16GB (ZFS) WiFi: WLE200NX
        pfsense 2.9.0 CE
        Packages: Apcupsd, Cron, Iftop, Iperf, LCDproc, Nmap, pfBlockerNG, RRD_Summary, Shellcmd, Snort, Speedtest, System_Patches.

        GertjanG 1 Reply Last reply
        Reply Quote 0
        • GertjanG
          Gertjan @FireOdo
          last edited by Gertjan

          @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 :

          79cd2e16-7e53-44b2-902c-d10dfef0e5b7-image.png

          and would break unbound.

          Let's fact heck :
          The /var/unbound/unbound.conf config file, at the bottom :
          773668d4-07cf-400c-abc8-709003c0ddf5-image.png

          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.

          e0df8657-c6e4-4134-8395-ee831e91b164-image.png

          edit : I'll add a d) : visit now the Unbound main settings page, and check that :

          c840ded4-5ca3-4cf6-8be6-68d3d6bbbe64-image.png

          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 ?

          No "help me" PM's please. Use the forum, the community will thank you.

          1 Reply Last reply
          Reply Quote 0
          • R
            richardsago
            last edited by richardsago

            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"
            179e462e-c996-48f5-8e4f-1c2049236818-image.png

            Services > DNS Resolver > "Python Module Script" becomes pfb_unbound
            6e637bf6-be23-4050-bd78-68f467a05c34-image.png

            pfb_unbound.py is in /var/unbound
            92219dfd-4609-49f5-9bf8-058aea4e8bdf-image.png

            Status > System Logs > General has this line about DNS servers not available
            7e92cd4f-a294-45ba-8d04-6debcc83f0bd-image.png

            This is Status > System Logs > "DNS Resolver" entries before and after setting DNSBL to "Unbound python mode"
            c4101b1e-2d65-4eda-b9fc-4cbea3f1bb1a-image.png

            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

            GertjanG 1 Reply Last reply
            Reply Quote 0
            • GertjanG
              Gertjan @richardsago
              last edited by Gertjan

              @richardsago

              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) :

              b5e1c94b-e3bc-41a7-ac33-101633fee6a1-image.png

              edit : I presume default unbound log settings :
              c4a2c74a-3ba7-4544-afd5-884247b731c7-image.png

              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 :

              a40fbcda-1dbd-4259-b9ab-b886c16c548d-image.png

              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.

              No "help me" PM's please. Use the forum, the community will thank you.

              R 1 Reply Last reply
              Reply Quote 0
              • R
                richardsago @Gertjan
                last edited by richardsago

                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 so but internet access is working. Below is part of the recurring message taken right after the last pfsense restart:
                2dc8cf80-db33-4242-a400-8f58953e83ff-image.png

                Edited to add: After reverting to the saved snapshot this is the last entry on Status > System > DNS Resolver:
                c7674470-f98d-4e13-a6c1-9e4f3f91d602-image.png

                GertjanG 1 Reply Last reply
                Reply Quote 0
                • GertjanG
                  Gertjan @richardsago
                  last edited by

                  @richardsago

                  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.

                  No "help me" PM's please. Use the forum, the community will thank you.

                  R 1 Reply Last reply
                  Reply Quote 0
                  • R
                    richardsago @Gertjan
                    last edited by

                    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.

                    GertjanG 1 Reply Last reply
                    Reply Quote 0
                    • GertjanG
                      Gertjan @richardsago
                      last edited by

                      @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.

                      No "help me" PM's please. Use the forum, the community will thank you.

                      R 1 Reply Last reply
                      Reply Quote 0
                      • R
                        richardsago @Gertjan
                        last edited by

                        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.

                        Raffi_R 1 Reply Last reply
                        Reply Quote 0
                        • Raffi_R
                          Raffi_ @richardsago
                          last edited by

                          @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.

                          R 1 Reply Last reply
                          Reply Quote 0
                          • R
                            richardsago @Raffi_
                            last edited by

                            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.

                            Raffi_R SteveITSS 2 Replies Last reply
                            Reply Quote 0
                            • Raffi_R
                              Raffi_ @richardsago
                              last edited by

                              @richardsago it could be that our issues are different. I hope you're able to figure it out.

                              1 Reply Last reply
                              Reply Quote 0
                              • SteveITSS
                                SteveITS Galactic Empire @richardsago
                                last edited by

                                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.

                                To upgrade, select your branch in System/Update/Update Settings. When upgrading, allow 10-15 minutes to reboot, or more depending on packages, CPU, and/or disk speed.
                                Only install packages for your version of pfSense.
                                Upvote 👍 helpful posts!

                                1 Reply Last reply
                                Reply Quote 0
                                • R
                                  richardsago
                                  last edited by

                                  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.

                                  1 Reply Last reply
                                  Reply Quote 0

                                  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 Login
                                  • First post
                                    Last post
                                  Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
                                  Privacy Policy · Cookie Policy