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.
    • BBcan177B
      BBcan177 Moderator
      last edited by

      @GoldServe:

      Has anyone noticed the dnsbl alert entries have the wrong time? Seems to be a few hours ahead from all the other firewall entries.

      Which DNSBL alerts? HTTP or HTTPS. For HTTP, it takes the request time from the remote Lan device. Could the clock be off on one of your desktops?

      "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
      • G
        GoldServe
        last edited by

        Seems like HTTP timestamps are wrong. Which remote Lan device? All my laptops and desktops are Macs and their times are all correct. I am running pfsense in ESXI 6…

        1 Reply Last reply Reply Quote 0
        • G
          GoldServe
          last edited by

          I don't know if it matters but it seems like my /usr/local/etc/php.ini has this line set

          date.timezone="Etc/UTC"
          

          when clearly /etc/rc.php_ini_setup contains the following code:

          unset TIMEZONE
          # Fetch the timezone from /var/db/zoneinfo if present
          if [ -f /var/db/zoneinfo ]; then
          	TIMEZONE=$(cat /var/db/zoneinfo)
          fi
          
          if [ -z "${TIMEZONE}" ]; then
          	# Second option is from config.xml
          	TIMEZONE=$(/usr/local/sbin/read_xml_tag.sh string system/timezone)
          fi
          
          if [ -z "${TIMEZONE}" ]; then
          	# Last option, use default value from $g or Etc/UTC
          	TIMEZONE=$(/usr/local/sbin/read_global_var default_timezone "Etc/UTC")
          fi
          

          Anyone spot anything wrong? I verified the timezone is correct by running the script /usr/local/sbin/read_xml_tag.sh string system/timezone

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

            Hi,

            same situation in my environment. I changes from HTTPS WebUI to HTTP because WPAD is hosted on pfsense itself. But i defined all private IPs to go DIRECT and not using the proxy in the WPAD files. But unfortunately it does not work.

            Further I disabled auto proxy configuration and hardcoded the proxy in my browser but DNSBL still does only work with HTTP (pfsense WebUI page) but not with HTTPS. Further it does not log anything :-(

            PS:
            Anybody here who could suggest a good DNSBL which focuses on command and control server and such stuff?

            can u post ur wpad file content ,  ( Look my wpad file , for me after instructing wpad to give Direct connection to 10.x.x..x now its working okay

            @Nachtfalke:

            @killmasta93:

            FOR PEOPLE WITH GIF ISSUES READ THIS

            If your running WPAD and have on your navigator to auto detect proxy you WILL get the webGUI of pfSense instead of the GIF but disable the auto detect proxy on the navigator you then will see the GIF…It seems that WPAD overrides everything even when it comes to OpenVPN also...

            Thanks for that information. I am using WPAD with squid3 proxy. But I only get the WebUI with http websites. Is it working for you with httpS websites, too?
            Can you describe if you configued something sepcidal to get pfblocker-NG + squid (http + https) working?

            For me it looks like it is not working fpr https and it ios not working for http and https to see the bad websites in the "Alerts" tab of pfblopcker-ng.

            Regards

            @Nachtfalke:

            @killmasta93:

            Well I have pfBlockerNG working just for IP I had to disable DNSBL because WPAD was overriding everything. Because WPAD files are hosted on pfSense I had to revert to HTTP on the webGUI of pfSense. But by disabling auto detect proxy then works DNSBL but then WPAD wont work BUT transparent proxy will. I guess having WPAD and DNSBL wont work at the same time. UNLESS somehow on the wpad.dat a way to direct or ignore the 10.10.10.1 something that i wish it can do with OpenVPN. You get the HTTPS sites i guess because WPAD overlaps that but the http that would be the transparent proxy which DNSBL does not have an issue. Also depends if your webGUI is HTTPS or HTTP

            I also had issue with squid with wpad initially and  with BBcan177 help i resolved the issue with my setup

            i updated my wpad.pac file to make direct connected to 10.10.10.1

            
             function FindProxyForURL(url,host)
             {
            
                if (isInNet( host, "192.168.0.0", "255.255.255.0" )) 
                    { return "DIRECT"; }
            	 if (isInNet( host, "10.10.10.1", "255.255.255.0" )) 
                    { return "DIRECT"; }	
            	return "PROXY 192.168.0.1:3128";
             }
            
            

            now i am able to use proxy with wpad and also get 1x1 gif while blocking

            2.3-RC (amd64)
            built on Mon Apr 04 17:09:32 CDT 2016
            FreeBSD 10.3-RELEASE
            Intel(R) Core(TM)2 Duo CPU E4500 @ 2.20GHz

            darkstat 3.1.2_1
            Lightsquid 3.0.3_1
            mailreport 3.0_1
            pfBlockerNG 2.0.9_1  
            RRD_Summary 1.3.1_2
            snort 3.2.9.1_9  
            squid 0.4.16_1  
            squidGuard 1.14_1
            syslog-ng 1.1.2_2

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

              Hello! I just noticed today that pfBlocker is not "working" anymore. It's actually enabled and it was working fine blocking ads, now it seems nothing changed (I'm sure I haven't changed any settings) but I'm not getting ads blocked

              Here you can see it's enabled

              Any ideas on what's going on? There's no errors in the logs either :(

              It seems the latest blocked URLS were from April 19

              DNSBL Reject HTTPS,Apr 19 18:15:10,e.crashlytics.com
              DNSBL Reject HTTPS,Apr 19 18:15:10,e.crashlytics.com
              DNSBL Reject HTTPS,Apr 19 18:15:11,e.crashlytics.com
              DNSBL Reject HTTPS,Apr 19 18:15:11,e.crashlytics.com
              DNSBL Reject HTTPS,Apr 19 18:15:11,e.crashlytics.com
              DNSBL Reject HTTPS,Apr 19 18:15:11,e.crashlytics.com
              DNSBL Reject HTTPS,Apr 19 18:15:11,e.crashlytics.com
              DNSBL Reject HTTPS,Apr 19 18:15:11,e.crashlytics.com
              DNSBL Reject HTTPS,Apr 19 18:15:11,e.crashlytics.com
              DNSBL Reject HTTPS,Apr 19 18:15:11,e.crashlytics.com
              DNSBL Reject HTTPS,Apr 19 18:15:11,e.crashlytics.com
              DNSBL Reject HTTPS,Apr 19 18:15:44,ui.skype.com
              DNSBL Reject HTTPS,Apr 19 18:16:44,ui.skype.com
              DNSBL Reject HTTPS,Apr 19 18:17:44,ui.skype.com
              DNSBL Reject HTTPS,Apr 19 18:18:44,ui.skype.com
              DNSBL Reject HTTPS,Apr 19 18:19:44,ui.skype.com
              DNSBL Reject HTTPS,Apr 19 18:20:44,ui.skype.com
              DNSBL Reject HTTPS,Apr 19 18:20:51,ssl.google-analytics.com
              DNSBL Reject HTTPS,Apr 19 18:20:51,e.crashlytics.com
              DNSBL Reject HTTPS,Apr 19 18:20:51,e.crashlytics.com
              DNSBL Reject HTTPS,Apr 19 18:20:51,analytics.query.yahoo.com
              DNSBL Reject HTTPS,Apr 19 18:20:51,e.crashlytics.com
              DNSBL Reject HTTPS,Apr 19 18:20:51,e.crashlytics.com
              DNSBL Reject HTTPS,Apr 19 18:20:52,e.crashlytics.com
              DNSBL Reject HTTPS,Apr 19 18:20:52,e.crashlytics.com
              DNSBL Reject HTTPS,Apr 19 18:20:52,e.crashlytics.com
              DNSBL Reject HTTPS,Apr 19 18:20:52,e.crashlytics.com
              DNSBL Reject HTTPS,Apr 19 18:20:52,e.crashlytics.com
              
              1 Reply Last reply Reply Quote 0
              • BBcan177B
                BBcan177 Moderator
                last edited by

                @bluepr0:

                Hello! I just noticed today that pfBlocker is not "working" anymore. It's actually enabled and it was working fine blocking ads, now it seems nothing changed (I'm sure I haven't changed any settings) but I'm not getting ads blocked

                Ensure that the LAN devices have only pfSense set as their DNS server. Can you ping the DNSBL VIP address? Can you browse to the DNSBL VIP address?

                "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
                • BBcan177B
                  BBcan177 Moderator
                  last edited by

                  @Merchant:

                  I also had issue with squid with wpad initially and  with BBcan177 help i resolved the issue with my setup

                  i updated my wpad.pac file to make direct connected to 10.10.10.1

                  
                   function FindProxyForURL(url,host)
                   {
                      if (isInNet( host, "192.168.0.0", "255.255.255.0" )) 
                          { return "DIRECT"; }
                      if (isInNet( host, "10.10.10.1", "255.255.255.0" )) 
                          { return "DIRECT"; }	
                      return "PROXY 192.168.0.1:3128";
                   }
                   
                  

                  now i am able to use proxy with wpad and also get 1x1 gif while blocking

                  Thanks Merchant, I hope the other users that had the same issue can get this resolved also…  8)

                  "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
                  • B
                    bluepr0
                    last edited by

                    @BBcan177:

                    @bluepr0:

                    Hello! I just noticed today that pfBlocker is not "working" anymore. It's actually enabled and it was working fine blocking ads, now it seems nothing changed (I'm sure I haven't changed any settings) but I'm not getting ads blocked

                    Ensure that the LAN devices have only pfSense set as their DNS server. Can you ping the DNSBL VIP address? Can you browse to the DNSBL VIP address?

                    Hello BBcan177,

                    I can ping the IP without problems, and all my devices are using my pfsense IP as DNS (as before) so it shouldn't be a problem there. However, if by "browse the DNSBL IP" you mean that I should get a reply when trying to open it from a browser then no, I get an error

                    But as I said, I get ping

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

                      @bluepr0:

                      I can ping the IP without problems, and all my devices are using my pfsense IP as DNS (as before) so it shouldn't be a problem there. However, if by "browse the DNSBL IP" you mean that I should get a reply when trying to open it from a browser then no, I get an error

                      Do you have a multi-segmented LAN? ie -vlans etc… If so, there is an option in the DNSBL Tab, to create a Floating Permit rule. Select all the Lan segments that need access to the VIP...

                      When you browse to the VIP, it should return the 1x1... Have you tried a different browser? or other LAN device?

                      "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
                      • B
                        bluepr0
                        last edited by

                        @BBcan177:

                        @bluepr0:

                        I can ping the IP without problems, and all my devices are using my pfsense IP as DNS (as before) so it shouldn't be a problem there. However, if by "browse the DNSBL IP" you mean that I should get a reply when trying to open it from a browser then no, I get an error

                        Do you have a multi-segmented LAN? ie -vlans etc… If so, there is an option in the DNSBL Tab, to create a Floating Permit rule. Select all the Lan segments that need access to the VIP...

                        When you browse to the VIP, it should return the 1x1... Have you tried a different browser? or other LAN device?

                        Nop, I don't have VLANs.

                        Tried with Chrome but I'm getting same result

                        But I can still ping the IP. It seems a bit weird that I'm getting 265ms though, it's just a small LAN with a 8 port switch

                        Thanks again!

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

                          Are you using Squid (See posts above)?

                          If you can't browse to the DNSBL VIP, then it will always be slow, and you will not get any Alert logging…

                          "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
                          • BBcan177B
                            BBcan177 Moderator
                            last edited by

                            There is a new version of pfBlockerNG v2.0.11 for pfSense 2.3, which was merged today. Pull Request #114 here.

                            Changelog:

                            • Fix issues with de-installation (Not sure why anyone would de-install anyways :) )

                            • Fix an issue with 'States Removal', so that it only acts on 'Block|Reject' rules.

                            "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
                            • B
                              bluepr0
                              last edited by

                              @BBcan177:

                              Are you using Squid (See posts above)?

                              If you can't browse to the DNSBL VIP, then it will always be slow, and you will not get any Alert logging…

                              Yep, I'm using Squid. I will try to setup this wpad thing, is this guide still valid? https://doc.pfsense.org/index.php/WPAD_Autoconfigure_for_Squid

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

                                @bluepr0:

                                @BBcan177:

                                Are you using Squid (See posts above)?

                                If you can't browse to the DNSBL VIP, then it will always be slow, and you will not get any Alert logging…

                                Yep, I'm using Squid. I will try to setup this wpad thing, is this guide still valid? https://doc.pfsense.org/index.php/WPAD_Autoconfigure_for_Squid

                                I don't use Squid… Try changing wpad as suggested above by user "Merchant"

                                "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
                                • B
                                  bluepr0
                                  last edited by

                                  @BBcan177:

                                  @bluepr0:

                                  @BBcan177:

                                  Are you using Squid (See posts above)?

                                  If you can't browse to the DNSBL VIP, then it will always be slow, and you will not get any Alert logging…

                                  Yep, I'm using Squid. I will try to setup this wpad thing, is this guide still valid? https://doc.pfsense.org/index.php/WPAD_Autoconfigure_for_Squid

                                  I don't use Squid… Try changing wpad as suggested above by user "Merchant"

                                  Umm but I'm a bit lost about changing WPAD, I couldn't find anything related to pfsense and WPAD other than the guide I pasted above (https://doc.pfsense.org/index.php/WPAD_Autoconfigure_for_Squid) or is there an option in pfBlocker for WPAD?

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

                                    @bluepr0:

                                    @BBcan177:

                                    @bluepr0:

                                    I can ping the IP without problems, and all my devices are using my pfsense IP as DNS (as before) so it shouldn't be a problem there. However, if by "browse the DNSBL IP" you mean that I should get a reply when trying to open it from a browser then no, I get an error

                                    Do you have a multi-segmented LAN? ie -vlans etc… If so, there is an option in the DNSBL Tab, to create a Floating Permit rule. Select all the Lan segments that need access to the VIP...

                                    When you browse to the VIP, it should return the 1x1... Have you tried a different browser? or other LAN device?

                                    Nop, I don't have VLANs.

                                    Tried with Chrome but I'm getting same result

                                    But I can still ping the IP. It seems a bit weird that I'm getting 265ms though, it's just a small LAN with a 8 port switch

                                    Thanks again!

                                    pic shows you opened as http

                                    can u try opening https://10.10.10.1 ?

                                    2.3-RC (amd64)
                                    built on Mon Apr 04 17:09:32 CDT 2016
                                    FreeBSD 10.3-RELEASE
                                    Intel(R) Core(TM)2 Duo CPU E4500 @ 2.20GHz

                                    darkstat 3.1.2_1
                                    Lightsquid 3.0.3_1
                                    mailreport 3.0_1
                                    pfBlockerNG 2.0.9_1  
                                    RRD_Summary 1.3.1_2
                                    snort 3.2.9.1_9  
                                    squid 0.4.16_1  
                                    squidGuard 1.14_1
                                    syslog-ng 1.1.2_2

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

                                      @Merchant:

                                      @bluepr0:

                                      @BBcan177:

                                      @bluepr0:

                                      I can ping the IP without problems, and all my devices are using my pfsense IP as DNS (as before) so it shouldn't be a problem there. However, if by "browse the DNSBL IP" you mean that I should get a reply when trying to open it from a browser then no, I get an error

                                      Do you have a multi-segmented LAN? ie -vlans etc… If so, there is an option in the DNSBL Tab, to create a Floating Permit rule. Select all the Lan segments that need access to the VIP...

                                      When you browse to the VIP, it should return the 1x1... Have you tried a different browser? or other LAN device?

                                      Nop, I don't have VLANs.

                                      Tried with Chrome but I'm getting same result

                                      But I can still ping the IP. It seems a bit weird that I'm getting 265ms though, it's just a small LAN with a 8 port switch

                                      Thanks again!

                                      pic shows you opened as http

                                      can u try opening https://10.10.10.1 ?

                                      same result, sadly!

                                      There's one thing I don't get, though! This was working flawlessly, Squid + pfBlocker (even on 2.3) as I upgraded a week ago… why it stopped working now without touching anything? o.O

                                      Edit to add screenshot

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

                                        can u click details ?  see if there is option to add exception

                                        
                                        https://www.websense.com/content/support/library/web/v76/pac_file_best_practices/PAC_best_pract.aspx
                                        

                                        2.3-RC (amd64)
                                        built on Mon Apr 04 17:09:32 CDT 2016
                                        FreeBSD 10.3-RELEASE
                                        Intel(R) Core(TM)2 Duo CPU E4500 @ 2.20GHz

                                        darkstat 3.1.2_1
                                        Lightsquid 3.0.3_1
                                        mailreport 3.0_1
                                        pfBlockerNG 2.0.9_1  
                                        RRD_Summary 1.3.1_2
                                        snort 3.2.9.1_9  
                                        squid 0.4.16_1  
                                        squidGuard 1.14_1
                                        syslog-ng 1.1.2_2

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

                                          @Merchant:

                                          can u click details ?  see if there is option to add exception

                                          nop :(

                                          1 Reply Last reply Reply Quote 0
                                          • P
                                            pdrass
                                            last edited by

                                            It seems like this is one massive question board for the one plugin so I'm going to ask:

                                            I have 2.2.6-RELEASE (amd64)  > in the "alerts" area of pfblockerng I don't see anything logged in the dnsbl area
                                            I have 2.2.5-RELEASE (amd64)  > in the "alerts" area of pfblockerng I see everything including https notifications of limited info but ads are still blocked

                                            …so, is there a bug in the 2.2.6 release with respect to logging somehow?

                                            They're 2 separate FW's but I went through the settings and they match perfectly.  I also made sure the Windows server was in fact querying for DNS to the firewall and not anything else by blocking the server's IP > it then couldn't resolve external DNS hosts like google.com, yahoo.com but I could ping IP's (so not using DNS).  Once I unblocked it form the firewall, DNS worked again so I KNOW it's "working" like:

                                            hosts > query >> server >>> query firewall >>>> query public DNS + root servers

                                            • I also turned on unbound logging up to 5 or whatever the highest debug level and nothing jumped out at me...it's all "working" except for the alerts tab not showing what's blocked.  I also compared a known ad site (an online newspaper) from the 2 different sites and both pages are exactly the same in IE so I think what's happening is that it's dnsbl'ing the ads just not showing them in the alerts tab.

                                            Let me know if you find anything.

                                            Thanks!

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