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.9m 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.
    • P
      Panja
      last edited by

      I'm having another problem.
      All is working on my LAN interface but I have created a WIFI_GUEST interface.
      On the WIFI_GUEST interface it's not working. Some sites won't load at all.
      I have checked the floating rule and both interfaces (LAN + WIFI_GUEST) are checked.

      WIFI_GUEST firewall rules:

      1 Reply Last reply Reply Quote 0
      • J
        Jamerson
        last edited by

        Thank you so much,
        any suggestions how to configure this ?
        on the list of action, have to use disable or deny inbound ?

        I've configured deny inbound and enabled alexa list but the webserver isn't starting at all
        pfBlockerNG DNSBL Web Server is not started yet .

        what I am doing wrong ?

        1 Reply Last reply Reply Quote 0
        • H
          Hugovsky
          last edited by

          @Panja:

          I'm having another problem.
          All is working on my LAN interface but I have created a WIFI_GUEST interface.
          On the WIFI_GUEST interface it's not working. Some sites won't load at all.
          I have checked the floating rule and both interfaces (LAN + WIFI_GUEST) are checked.

          WIFI_GUEST firewall rules:

          You need a rule interface WIFI_GUEST interface source WIFI_GUEST net destination 127.0.0.1ports 8081 8443 so dnsbl can work.

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

            Does this only work with lists, or will it work with live dnsbl queries?

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

              @trinidadrancheria:

              will it work with live dnsbl queries?

              No.

              1 Reply Last reply Reply Quote 0
              • H
                ha11oga11o
                last edited by

                Dear BBcan177 i just want to express my huge gratitude to you incorporating DNSBL. Im using it for couple of days so far. It is insane how god is behave on my network. It is really insane how good it is. It simply work and it blocks so much garbage that is almost impossible to believe.

                THANK YOU!

                1 Reply Last reply Reply Quote 0
                • J
                  Jamerson
                  last edited by

                  cant get it to work,
                  the service is not starting." pfBlockerNG DNSBL Web Server "

                  rebooted the box, remove the package , reinstall it, no vail

                  please advise

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

                    @Hugovsky:

                    You need a rule interface WIFI_GUEST interface source WIFI_GUEST net destination 127.0.0.1ports 8081 8443 so dnsbl can work.

                    Thanks! It's working now. Created an alias for port 8081 + 8443 and added it to a rule to allow to 127.0.0.1
                    It was the "Block access to firewall" rule that prevented it to work, right?

                    This is the setup now, which is working. :)

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

                      I think you guys are missing this (on the DNSBL tab) with multiple LANs:

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

                        Nope, did not miss that.
                        As I stated here: https://forum.pfsense.org/index.php?topic=102470.msg574241#msg574241
                        I have checked the floating rule and both interfaces (LAN + WIFI_GUEST) are checked.

                        So I checked both interfaces (LAN + WIFI_GUEST) on the DNSBL tab.
                        And after that I went to the floating rule and both interfaces were marked in that rule.

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

                          @Panja:

                          Nope, did not miss that.
                          As I stated here: https://forum.pfsense.org/index.php?topic=102470.msg574241#msg574241
                          I have checked the floating rule and both interfaces (LAN + WIFI_GUEST) are checked.

                          Have hard time seeing how's that screenshot showing anything floating.

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

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

                              Yes, so that works, apparently. That "Block access to firewall" ain't doing any good there, clearly.

                              1 Reply Last reply Reply Quote 0
                              • J
                                Jamerson
                                last edited by

                                Guys, any suggestions why the webserver is not starting ?
                                pfBlockerNG DNSBL Web Server is not starting,
                                I've reinstalled the package but still no vail !

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

                                  @doktornotor:

                                  Yes, so that works, apparently. That "Block access to firewall" ain't doing any good there, clearly.

                                  How would you do it any differently than?
                                  I want my WIFI_GUEST interface to have no access to the firewall.
                                  Guests are not to be allowed to do anything except browse the internet.

                                  [UPDATE]

                                  Is this any better than.  8)
                                  I have blocked the admin ports (http/https + ssh) to the firewall instead of all.

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

                                    @Panja:

                                    I want my WIFI_GUEST interface to have no access to the firewall.
                                    Guests are not to be allowed to do anything except browse the internet.

                                    Understandable. I thing the same way.
                                    I did the same thing as you, and added 'sensitive ports' …..
                                    See image.

                                    CPFW.png
                                    CPFW.png_thumb

                                    No "help me" PM's please. Use the forum, the community will thank you.
                                    Edit : and where are the logs ??

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

                                      Thanks fellow Dutchman.  ;D
                                      I have created an alias with the admin ports now as well.
                                      See post above –> [UPDATE]

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

                                        @Jamerson:

                                        Guys, any suggestions why the webserver is not starting ?
                                        pfBlockerNG DNSBL Web Server is not starting,

                                        Yes. Because a variable is undefined on install (see the first line in the code below), so it creates a broken /usr/local/etc/rc.d/dnsbl.sh with missing path to the lighttpd config file.

                                        Copy and paste this to Diagnostics - Command Prompt - PHP Execute, click the 'Execute' button and problem fixed.

                                        
                                        $pfb['dnsbl_conf'] = '/var/unbound/pfb_dnsbl_lighty.conf';
                                        $rc = array();
                                        $rc['file'] = 'dnsbl.sh';
                                        $rc['start'] = << <eof<br># Start DNSBL Lighttpd webserver
                                        	if [ -f '{$pfb['dnsbl_conf']}' ]; then
                                        		/usr/local/sbin/lighttpd_pfb -f '{$pfb['dnsbl_conf']}'
                                        	fi
                                        
                                        	# Terminate DNSBL HTTPS Daemon if found
                                        	pidnum="$(/bin/ps -wax | /usr/bin/grep '[p]fblockerng.inc dnsbl' | /usr/bin/awk '{print $1}')"
                                        	if [ ! -z "\${pidnum}" ]; then
                                        		/bin/kill -9 "\${pidnum}"
                                        		/bin/sleep 2
                                        	fi
                                        
                                        	# Start DNSBL HTTPS Daemon
                                        	/usr/local/bin/php -f /usr/local/pkg/pfblockerng/pfblockerng.inc dnsbl &
                                        
                                        EOF;
                                        
                                        $rc['stop'] = << <eof<br># Terminate DNSBL Lighttpd webserver, if found.
                                        	pidnum="$(/bin/pgrep lighttpd_pfb)"
                                        	if [ ! -z "\${pidnum}" ]; then
                                        		/usr/bin/killall lighttpd_pfb
                                        	fi
                                        
                                        	# Terminate DNSBL HTTPS Daemon, if found.
                                        	pidnum="$(/bin/ps -wax | /usr/bin/grep '[p]fblockerng.inc dnsbl' | /usr/bin/awk '{print $1}')"
                                        	if [ ! -z "\${pidnum}" ]; then
                                        		/bin/kill -9 "\${pidnum}"
                                        		/bin/sleep 2
                                        	fi
                                        
                                        EOF;
                                        
                                        write_rcfile($rc);
                                        
                                        mwexec("/usr/bin/sed -i -e 's/\r//g' /usr/local/etc/rc.d/dnsbl.sh");
                                        mwexec_bg("/usr/local/etc/rc.d/dnsbl.sh start");</eof<br></eof<br> 
                                        
                                        1 Reply Last reply Reply Quote 0
                                        • P
                                          Panja
                                          last edited by

                                          Is there a way, or will there be a way (in a future release) to add our own EasyList?
                                          As a Dutchman, I would like to add the Dutch EasyList, to block elements specially found on Dutch websites.

                                          Thanks

                                          1 Reply Last reply Reply Quote 0
                                          • J
                                            Jamerson
                                            last edited by

                                            @doktornotor:

                                            @Jamerson:

                                            Guys, any suggestions why the webserver is not starting ?
                                            pfBlockerNG DNSBL Web Server is not starting,

                                            Yes. Because a variable is undefined on install (see the first line in the code below), so it creates a broken /usr/local/etc/rc.d/dnsbl.sh with missing path to the lighttpd config file.

                                            Copy and paste this to Diagnostics - Command Prompt - PHP Execute, click the 'Execute' button and problem fixed.

                                            
                                            $pfb['dnsbl_conf'] = '/var/unbound/pfb_dnsbl_lighty.conf';
                                            $rc = array();
                                            $rc['file'] = 'dnsbl.sh';
                                            $rc['start'] = << <eof<br># Start DNSBL Lighttpd webserver
                                            	if [ -f '{$pfb['dnsbl_conf']}' ]; then
                                            		/usr/local/sbin/lighttpd_pfb -f '{$pfb['dnsbl_conf']}'
                                            	fi
                                            
                                            	# Terminate DNSBL HTTPS Daemon if found
                                            	pidnum="$(/bin/ps -wax | /usr/bin/grep '[p]fblockerng.inc dnsbl' | /usr/bin/awk '{print $1}')"
                                            	if [ ! -z "\${pidnum}" ]; then
                                            		/bin/kill -9 "\${pidnum}"
                                            		/bin/sleep 2
                                            	fi
                                            
                                            	# Start DNSBL HTTPS Daemon
                                            	/usr/local/bin/php -f /usr/local/pkg/pfblockerng/pfblockerng.inc dnsbl &
                                            
                                            EOF;
                                            
                                            $rc['stop'] = << <eof<br># Terminate DNSBL Lighttpd webserver, if found.
                                            	pidnum="$(/bin/pgrep lighttpd_pfb)"
                                            	if [ ! -z "\${pidnum}" ]; then
                                            		/usr/bin/killall lighttpd_pfb
                                            	fi
                                            
                                            	# Terminate DNSBL HTTPS Daemon, if found.
                                            	pidnum="$(/bin/ps -wax | /usr/bin/grep '[p]fblockerng.inc dnsbl' | /usr/bin/awk '{print $1}')"
                                            	if [ ! -z "\${pidnum}" ]; then
                                            		/bin/kill -9 "\${pidnum}"
                                            		/bin/sleep 2
                                            	fi
                                            
                                            EOF;
                                            
                                            write_rcfile($rc);
                                            
                                            mwexec("/usr/bin/sed -i -e 's/\r//g' /usr/local/etc/rc.d/dnsbl.sh");
                                            mwexec_bg("/usr/local/etc/rc.d/dnsbl.sh start");</eof<br></eof<br> 
                                            

                                            thank you mate,
                                            runned the php code but nothing happens .

                                            I get this error

                                            Diagnostics: Execute command help

                                            Note: this function is unsupported. Use it on your own risk!

                                            rebooted the firewall but the services still not starting

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