Quickest way to reload pfBlockerNG rules?



  • What's the quickest way to reload the rules after making a change to the local rules?  For instance, if I add a domain to the TLD list it seems that the webgui way is Save that page, go to Update, select Reload and DNSBL then click the Run button.

    Is there a quicker way to do that from a command line?


  • Moderator

    Yes there is, but its not safe to do so… Reason being, that the Update Tab checks to see if there are any CRON tasks that are running, and it won't allow an Update/Reload while another task is currently executing... That will be messy with the database...

    And once you run a manual Update/Reload, it disengages any future Cron task, until the manual run has completed...

    However, if you are sure that cron is not running, or expected to run shortly, then:  ( Use at your own risk :)  )

    php /usr/local/www/pfblockerng/pfblockerng.php updatednsbl
    


  • @BBcan177:

    Yes there is, but its not safe to do so… Reason being, that the Update Tab checks to see if there are any CRON tasks that are running, and it won't allow an Update/Reload while another task is currently executing... That will be messy with the database...

    And once you run a manual Update/Reload, it disengages any future Cron task, until the manual run has completed...

    However, if you are sure that cron is not running, or expected to run shortly, then:  ( Use at your own risk :)  )

    php /usr/local/www/pfblockerng/pfblockerng.php updatednsbl
    

    Thanks, that'll help speed up troubleshooting and testing.


  • Moderator

    Also, it won't display the log information from the shell… So while the reload task does complete... its not reporting that data to the shell... It's important to review the log for any issues...

    You would need to run a tail command in another window:

    tail -f /var/log/pfblockerng/pfblockerng.log
    

Log in to reply