Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    PfBlockerNG v2.0 w/DNSBL

    Scheduled Pinned Locked Moved pfBlockerNG
    1.1k Posts 192 Posters 1.7m Views
    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.
    • A
      Atlan
      last edited by

      I am receiving certificate invalid errors after enabling the DNSBL when navigating certain sites - so far the culprit seems to mainly be googleads.g.doubleclick.net when trying to serve content over an HTTPS enabled website.

      The attempt still shows in the Alerts tab of pfBlockerNG, the main site still loads, but it seems to be wanting to use the firewall's self signed certificate as the certificate for the ad server host.

      Did I miss a setting somewhere to prevent this from happening?

      1 Reply Last reply Reply Quote 0
      • D
        doktornotor Banned
        last edited by

        There's no such setting anywhere and no way to prevent this from happening really, except for whitelisting the domain.

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

          @Atlan

          To a certain extent, this isn't surprising.  pfBlockerNG essentially has to Man-in-the-Midde HTTPS.  If the ad is being loaded from an HTTPS server (I don't necessarily mean the page you're viewing, rather where the ad itself is coming from), then pfBlockerNG redirects you to its own little webserver running on your pfsense box, and, since is done over HTTPS, that webserver uses a generic, default certificate.  It's a different cert than what is used for the pfsense WebGUI.  For various reasons, pfBlockerNG uses the same certifcate for every blocked HTTPS resource.  This creates a problem because the name in the certificate doesn't match the domain name of the blocked resource, which is why you see certificate warnings.  There's no good way around this, though.  Attempting to dynamically create valid certs off a CA running on the pfsense box would be both complicated and slow.

          But, I'm a little surprised you're seeing warnings.  I used to see warnings occasionally, but I haven't for a while.  I thought browsers just started silently dropping HTTPS connections to external resources when there's a bad certificate.

          Can you provide additional information to reproduce this?  What browser are you using?  What webpage were you accessing?  If I can see an example, and maybe inspect a packet capture and page source code may be I can see what's going on.

          1 Reply Last reply Reply Quote 0
          • M
            MBwork
            last edited by

            What about setting your virtual address to 0.0.0.0? As that whole /8 is non-routable, you wouldn't get the cert error. It would just silently fail to load ads.

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

              @mbarnes:

              What about setting your virtual address to 0.0.0.0? As that whole /8 is non-routable, you wouldn't get the cert error. It would just silently fail to load ads.

              While that might hide the cert error, there would be downsides.  First, some some pages will hang as they wait for the ad server to respond.  Second, blackholing the traffic completely by setting the VIP to something other than the DNSBL webserver will disable alerts.  That would create problems, because the regular ad-blocking lists WILL break some sites and mobile apps.  The alerts are, by far, the easiest way to track down problems.

              There are better plausible workarounds, but we need to see some examples to understand under what circumstances people run into cert errors.

              1 Reply Last reply Reply Quote 0
              • B
                BIGGRIMTIM
                last edited by

                Sorry if this is stupid question.  I am using OpenDNS and wondered if I can use DNSBL along with it?  The only way I was able to get alert data was by changing the DNS settings on my PC.

                Thanks.

                1 Reply Last reply Reply Quote 0
                • D
                  doktornotor Banned
                  last edited by

                  @BIGGRIMTIM:

                  Sorry if this is stupid question.  I am using OpenDNS and wondered if I can use DNSBL along with it?  The only way I was able to get alert data was by changing the DNS settings on my PC.

                  Not in this way. If you point your clients to pfSense as DNS server and use OpenDNS as forwarders for Unbound, then yes it should work.

                  1 Reply Last reply Reply Quote 0
                  • T
                    tonymorella
                    last edited by

                    @Atlan:

                    I am receiving certificate invalid errors after enabling the DNSBL when navigating certain sites - so far the culprit seems to mainly be googleads.g.doubleclick.net when trying to serve content over an HTTPS enabled website.

                    The attempt still shows in the Alerts tab of pfBlockerNG, the main site still loads, but it seems to be wanting to use the firewall's self signed certificate as the certificate for the ad server host.

                    Did I miss a setting somewhere to prevent this from happening?

                    Ya ran into the same problem while beta testing, completely forgot about this issue until I read your post :) For a quick fix I created a CA and web certificate via pfsense GUI then copies this cert to /var/unbound/dnsbl_cert.pem which dnsbl light http will use.  Then push out the CA to all the desktops, could be done via GPO or login scripts. With https://letsencrypt.org/ picking up traction, everything is going to be running over TLS or SSL soon going to have to implement this type of fix.

                    **EDIT: Sorry guys did a bad job on this post and what I was doing, it does not fix the underlying issue with the TLS stream being bad because the cert is not valid, reggie14 did a much better job testing this than I. In my setup is simply helped limit the errors in Chrome. Again just a quick fix that might help. Again sorry for the confusion.

                    FYI the update from Chrome 45 to 46 made a difference in what come up under security warnings:
                    http://arstechnica.com/information-technology/2015/10/chrome-finally-kills-off-the-http-https-mixed-content-warning/**

                    Thanks
                    Tony M

                    1 Reply Last reply Reply Quote 0
                    • A
                      asterix
                      last edited by

                      Getting this EasyList error for w/o elements.

                      [ DNSBL_EasyList - w/o Elements ] Download FAIL
                        Could not determine IP address of host.
                        Firewall and/or IDS are not blocking download.

                      1 Reply Last reply Reply Quote 0
                      • D
                        doktornotor Banned
                        last edited by

                        @Asterix:

                        Getting this EasyList error for w/o elements.

                        [ DNSBL_EasyList - w/o Elements ] Download FAIL
                          Could not determine IP address of host.
                          Firewall and/or IDS are not blocking download.

                        Well that's not a package error. You need working DNS. :D

                        
                        $ host easylist-downloads.adblockplus.org
                        easylist-downloads.adblockplus.org has address 148.251.139.76
                        easylist-downloads.adblockplus.org has address 144.76.100.145
                        easylist-downloads.adblockplus.org has IPv6 address 2a01:4f8:200:114f::2
                        easylist-downloads.adblockplus.org has IPv6 address 2a01:4f8:192:7126::2
                        
                        
                        1 Reply Last reply Reply Quote 0
                        • T
                          tonymorella
                          last edited by

                          @doktornotor:

                          @Asterix:

                          Getting this EasyList error for w/o elements.

                          [ DNSBL_EasyList - w/o Elements ] Download FAIL
                            Could not determine IP address of host.
                            Firewall and/or IDS are not blocking download.

                          Well that's not a package error. You need working DNS. :D

                          
                          $ host easylist-downloads.adblockplus.org
                          easylist-downloads.adblockplus.org has address 148.251.139.76
                          easylist-downloads.adblockplus.org has address 144.76.100.145
                          easylist-downloads.adblockplus.org has IPv6 address 2a01:4f8:200:114f::2
                          easylist-downloads.adblockplus.org has IPv6 address 2a01:4f8:192:7126::2
                          
                          

                          Filter out easylist-downloads.adblockplus.org via DNSBL as well as add it to an allow alias and see if this helps. Depending out how you having things setup could be blocking.  Host lookup most likely works because it's doing is via unbound. Just a thought let us know :)

                          Tony M

                          1 Reply Last reply Reply Quote 0
                          • S
                            shopro
                            last edited by

                            I must be doing something wrong as when I load a page containing ads the page load stops until ad servers are timed out. Also in Status -> Services, dnsbl is showed as stopped. Can't seem to find any error logs about it anywhere. Also my alerts tab is empty besides the Deny list.

                            I configured dnsbl as instructed on page 1 and have double checked everything to be the same way. Though maybe the reason is that my clients use my domain controller as their dns which forwards to pfsense which in turn forwards to OpenDNS. Any ideas where I went wrong?

                            1 Reply Last reply Reply Quote 0
                            • T
                              tonymorella
                              last edited by

                              @shopro:

                              I must be doing something wrong as when I load a page containing ads the page load stops until ad servers are timed out. Also in Status -> Services, dnsbl is showed as stopped. Can't seem to find any error logs about it anywhere. Also my alerts tab is empty besides the Deny list.

                              I configured dnsbl as instructed on page 1 and have double checked everything to be the same way. Though maybe the reason is that my clients use my domain controller as their dns which forwards to pfsense which in turn forwards to OpenDNS. Any ideas where I went wrong?

                              dnsbl show as stopped is not a good sign, are you sure dnsbl check box is enabled as well as unbound (DNS Resolver)?

                              1 Reply Last reply Reply Quote 0
                              • S
                                shopro
                                last edited by

                                @tonymorella:

                                @shopro:

                                I must be doing something wrong as when I load a page containing ads the page load stops until ad servers are timed out. Also in Status -> Services, dnsbl is showed as stopped. Can't seem to find any error logs about it anywhere. Also my alerts tab is empty besides the Deny list.

                                I configured dnsbl as instructed on page 1 and have double checked everything to be the same way. Though maybe the reason is that my clients use my domain controller as their dns which forwards to pfsense which in turn forwards to OpenDNS. Any ideas where I went wrong?

                                dnsbl show as stopped is not a good sign, are you sure dnsbl check box is enabled as well as unbound (DNS Resolver)?

                                Yes, both dnsbl and unbound check box's are checked. The funny thing is that it blocks the ad's when enabled, but doesn't seem to use the 1x1 gif and instead just times out the servers.

                                1 Reply Last reply Reply Quote 0
                                • T
                                  tonymorella
                                  last edited by

                                  @shopro:

                                  @tonymorella:

                                  @shopro:

                                  I must be doing something wrong as when I load a page containing ads the page load stops until ad servers are timed out. Also in Status -> Services, dnsbl is showed as stopped. Can't seem to find any error logs about it anywhere. Also my alerts tab is empty besides the Deny list.

                                  I configured dnsbl as instructed on page 1 and have double checked everything to be the same way. Though maybe the reason is that my clients use my domain controller as their dns which forwards to pfsense which in turn forwards to OpenDNS. Any ideas where I went wrong?

                                  dnsbl show as stopped is not a good sign, are you sure dnsbl check box is enabled as well as unbound (DNS Resolver)?

                                  Yes, both dnsbl and unbound check box's are checked. The funny thing is that it blocks the ad's when enabled, but doesn't seem to use the 1x1 gif and instead just times out the servers.

                                  If the dnsbl web server is not running this is what I would expect, request will not have a response and will time out.  Anything in /var/log/pfblockerng/dnsbl_error.log and dnsbl.log files?

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    shopro
                                    last edited by

                                    The dnsbl_error.log seems normal, no errors or anything else like that. The dnsbl.log says "Log file is empty or does not exist." which I assume is because the service isn't started.

                                    1 Reply Last reply Reply Quote 0
                                    • S
                                      shopro
                                      last edited by

                                      @shopro:

                                      The dnsbl_error.log seems normal, no errors or anything else like that. The dnsbl.log says "Log file is empty or does not exist." which I assume is because the service isn't started.

                                      Got it working by completely removing the package and settings and reinstalling, removing settings was the key though no idea what was wrong. Now it starts as it should.

                                      1 Reply Last reply Reply Quote 0
                                      • A
                                        AndrewZ
                                        last edited by

                                        Upgraded to 2.0, now always see the yellow sign on the status page with the following tooltip:

                                        pfBlockerNG deDuplcation is out of sync. Perform a Force Reload to correct.

                                        Tried Force Reload, Update, Cron, selecting/de-selecting deduplication is settings - nothing helps.
                                        This warning goes off only if deduplication is disabled.

                                        Clipboard01.jpg
                                        Clipboard01.jpg_thumb

                                        1 Reply Last reply Reply Quote 0
                                        • D
                                          doktornotor Banned
                                          last edited by

                                          @tonymorella:

                                          Host lookup most likely works because it's doing is via unbound. Just a thought let us know :)

                                          Well, it's not. Also not blocked, otherwise it'd be resolved to the DNSBL VIP.

                                          @AndrewZ:

                                          Tried Force Reload, Update, Cron, selecting/de-selecting deduplication is settings - nothing helps.
                                          This warning goes off only if deduplication is disabled.

                                          Probably easier to just wipe the lists:

                                          
                                          rm -rf /var/db/pfblockerng/
                                          
                                          

                                          Reinstall the package and run 'Force Update' after that.

                                          1 Reply Last reply Reply Quote 0
                                          • BBcan177B
                                            BBcan177 Moderator
                                            last edited by

                                            @Atlan:

                                            I am receiving certificate invalid errors after enabling the DNSBL when navigating certain sites - so far the culprit seems to mainly be googleads.g.doubleclick.net when trying to serve content over an HTTPS enabled website.

                                            @Atlan, As indicated in reggie14's post, if you can reply back with the following questions below and we can go from there.

                                            @reggie14:

                                            Can you provide additional information to reproduce this?  What browser are you using?  What webpage were you accessing?  If I can see an example, and maybe inspect a packet capture and page source code may be I can see what's going on.

                                            @shopro:

                                            @shopro:

                                            The dnsbl_error.log seems normal, no errors or anything else like that. The dnsbl.log says "Log file is empty or does not exist." which I assume is because the service isn't started.

                                            Got it working by completely removing the package and settings and reinstalling, removing settings was the key though no idea what was wrong. Now it starts as it should.

                                            If there are errors starting/stopping the DNSBL service, those will be logged to the pfSense System log.  The RC file for the DNSBL service is here (/usr/local/etc/rc.d/dnsbl.sh [stop|start|restart])

                                            @shopro:

                                            The dnsbl_error.log seems normal, no errors or anything else like that. The dnsbl.log says "Log file is empty or does not exist." which I assume is because the service isn't started.

                                            The dnsbl_error.log is actually an error log for DNSBL Lighttpd. I will be renaming this file to something else to avoid this confusion. This log is used to collect any HTTPS alerts from the Lighttpd conditional error process (debug.log-condition-handling option).

                                            @AndrewZ:

                                            Upgraded to 2.0, now always see the yellow sign on the status page with the following tooltip:

                                            This warning indicates that the masterfile is out of sync with the files in the /deny folder. This is a new feature that was added to v2.0 to warn users about this issue. Usually running a 'Force Reload' is sufficient to fix that warning; however, clearing out all the files and starting fresh might be needed in certain conditions. If this is still an issue, please review the pfblockerng.log file for other clues.

                                            @doktornotor:

                                            Probably easier to just wipe the lists:

                                            
                                            rm -rf /var/db/pfblockerng/
                                            
                                            

                                            Reinstall the package and run 'Force Update' after that.

                                            Can also just uncheck 'Keep Settings' and Disable 'pfBNG' and 'Save' which will do the same :)

                                            @doktornotor:

                                            @Asterix:

                                            Getting this EasyList error for w/o elements.

                                            [ DNSBL_EasyList - w/o Elements ] Download FAIL
                                              Could not determine IP address of host.
                                              Firewall and/or IDS are not blocking download.

                                            Well, it's not. Also not blocked, otherwise it'd be resolved to the DNSBL VIP.

                                            I will be adding another validation on failed downloads to check if the 'Host Address' returns as the DNSBL VIP address (Meaning DNSBL is blocking the download), and adding that to the Error Response. But yes, if the error is "Could not determine IP address of host.", then there was another issue with the DNS lookup that failed. If DNSBL was blocking this download, that error message would not be displayed.

                                            "Experience is something you don't get until just after you need it."

                                            Website: http://pfBlockerNG.com
                                            Twitter: @BBcan177  #pfBlockerNG
                                            Reddit: https://www.reddit.com/r/pfBlockerNG/new/

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.