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

    Quickest way to reload pfBlockerNG rules?

    Scheduled Pinned Locked Moved pfBlockerNG
    4 Posts 2 Posters 2.5k 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.
    • BiloxiGeekB
      BiloxiGeek
      last edited by

      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?

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

        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
        

        "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
        • BiloxiGeekB
          BiloxiGeek
          last edited by

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

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

            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
            

            "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
            • M mcury referenced this topic on
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.