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

Command line cmd to trigger ip update?

Scheduled Pinned Locked Moved pfBlockerNG
3 Posts 2 Posters 822 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.
  • K
    Kai_null
    last edited by Apr 18, 2018, 10:19 PM

    Hello,
        What is the cmd line command to just do an ip update?

    Thank you

    note:
    My dnsbl list is very large, and takes the internet down ( resolve dns ) for several minutes when it updates, so I have that scheduled to run in the middle of the night.  However, I wanted to run the ipv4 update hourly, without the dnsbl update.  I am thinking if I knew the command to just do the ipv4 update, this would be achievable.  I can see in the ui it is possible to trigger just a ip reload, so I think just ip update should be possible.  I intend to take the cmd line call and stick it in a new cron job.

    1 Reply Last reply Reply Quote 0
    • R
      RonpfS
      last edited by Apr 18, 2018, 10:34 PM

      Did you try to set the Update Frequency of your DNSBL tables to "Once a day"

      And the Cron start hour in the middle of the night?

      2.4.5-RELEASE-p1 (amd64)
      Intel Core2 Quad CPU Q8400 @ 2.66GHz 8GB
      Backup 0.5_5, Bandwidthd 0.7.4_4, Cron 0.3.7_5, pfBlockerNG-devel 3.0.0_16, Status_Traffic_Totals 2.3.1_1, System_Patches 1.2_5

      1 Reply Last reply Reply Quote 0
      • K
        Kai_null
        last edited by Apr 19, 2018, 1:52 AM Apr 19, 2018, 12:21 AM

        Actually I am having difficulties with the cron settings, very similar to this person (drewsaur):
        https://forum.pfsense.org/index.php?topic=129048.0
        unfortunately it was decided he did not have a bug and ignored :(

        I get the same error, only ever updates at 1:30.  Played around with it a bit, and it seems the only field that takes is the minute field "pfb_min" it ignores the rest.  The cron settings solution you indicated is a good idea, but seems unlikely to work because of the above error.  Unlike drewsaur, having it only update at 1:30 am was not really a problem for me.  Rather then try and fix a messed up cron thing, I figured it would be easier just to add a new job for what I wanted.

        . . .

        I dug through the pfblockerng_update.php to find the command, it it looks like its not command line at all per say, but sending a call to pfblockerng.php, which in turn calls sync_package_pfblockerng.  Not familiar with bsd or package manager so will continue down the rabbit hole when I have time.

        edit:
        sync_package_pfblockerng is not a package manager call at all I guess, it is defined in pfblockerng.inc, which is executing .php to do the update.  A neat way to do it.

        edit:
        answering my original question:

        commands for pfblocker can be executed with:
        /usr/local/bin/php /usr/local/www/pfblockerng/pfblockerng.php [put your option here]
        ex: /usr/local/bin/php /usr/local/www/pfblockerng/pfblockerng.php update

        the options for [put your option here] are defined in the /usr/local/www/pfblockerng/pfblockerng.php file in a switch statement.  None of them achieve the objective of my original question.

        My personal solution was to add a new option by editing pfblockerng.php & pfblockerng.inc.  This is a grade A hack job, but if anyone is interested inquire and I will post the details.

        1 Reply Last reply Reply Quote 0
        1 out of 3
        • First post
          1/3
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
          This community forum collects and processes your personal information.
          consent.not_received