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

    How do I force alias tables updates?

    Scheduled Pinned Locked Moved Firewalling
    2 Posts 2 Posters 485 Views 2 Watching
    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.
    • senseivitaS Offline
      senseivita
      last edited by

      To edit the ruleset more quickly I created generic groups, then based on them I created tons of combinations. Then I can just edit one of these lists, that thanks to Active Directory automounts the drive where they're in on any computer I use -- not Linux yet, but I've been learning about Samba homefolders, maybe soon. :)

      Everything was going great until I was reminded these lists update at the earliest ONLY ONCE A DAY. Aliases updated every 5 minutes in comparison, now every minute.

      So I turned to pfBlockerNG, where the minimum is an hour. Still better than twenty four of them; but it did not recognize the syntax I suppose. Changing the line breaks didn't help. It was LF→CRLF, anyway. I didn't expect it to work. :/

      [ steer_blocked_v4 ]		 Downloading update .. 200 OK. completed ..
      [ pfB_steer_blocked_v4 steer_blocked_v4 ] No IPs found! Ensure only IP based Feeds are used! ]
      
      [ steer_bypasseverything_v4 ]	 Downloading update .. 200 OK. completed ..
      [ pfB_steer_bypasseverything_v4 steer_bypasseverything_v4 ] No IPs found! Ensure only IP based Feeds are used! ]
      
      [ steer_bypassprotection_v4 ]	 Downloading update .. 200 OK. completed ..
      [ pfB_steer_bypassprotection_v4 steer_bypassprotection_v4 ] No IPs found! Ensure only IP based Feeds are used! ]
      
      [ steer_cloudfront_v4 ]		 Downloading update .. 200 OK. completed ..
      [ pfB_steer_cloudfront_v4 steer_cloudfront_v4 ] No IPs found! Ensure only IP based Feeds are used! ]
      
      [ steer_cfThenLocal_v4 ]	 Downloading update .. 200 OK. completed ..
      [ pfB_steer_cfThenLocal_v4 steer_cfThenLocal_v4 ] No IPs found! Ensure only IP based Feeds are used! ]
      
      [ steer_local_v4 ]		 Downloading update .. 200 OK. completed ..
      [ pfB_steer_local_v4 steer_local_v4 ] No IPs found! Ensure only IP based Feeds are used! ]
      
      [ steer_localThenCf_v4 ]	 Downloading update .. 200 OK. completed ..
      [ pfB_steer_localThenCf_v4 steer_localThenCf_v4 ] No IPs found! Ensure only IP based Feeds are used! ]
      

      These are the same addresses that the standard alias module(?) had no issue downloading. I'm even using an IP address so there's no need for DNS.

      I'm back to tables then.

      I searched the logs for names of similar aliases, I found when updates where made the messages belonged to php-fpm process; it's too generic and I can't just kill PHP either.

      ( pretend that I said "BRB" and went away for 10min )

      *heaving* It was just php, not php-fpm, the latter appears when I interact with the tables on the GUI. The former starts its log entry with rc.update_urltables. ← Is that the updater?

      Is it something like [/path/to/]php /path/to/rc.update_urltables? 😮

      Missing something? Word endings, maybe? I included a free puzzle in this msg if you solv--okay, I'm lying. It's dyslexia, makes me do that, sorry! Just finish the word; they're rarely misspelled, just incomplete. Yeah-yeah-I know. Same thing.

      V 1 Reply Last reply Reply Quote 0
      • V Offline
        viragomann @senseivita
        last edited by

        @skilledinept
        I needed a shorter update interval some time ago. I had to modify this file: /etc/inc/pfsense-utils.inc

        Search for the line

        ((time() - filemtime($urltable_filename)) > ($freq * 86400 - 90)) ||
        

        '86400 - 90' is the minimum table age in seconds for a new update, so one day here.

        However, changing this value applies to any of your tables. Since I needed it just for one table only, I stated it in the code. So the line looked like this:

        (!strpos($urltable_filename, "GMX_SMTP_Server") And ((time() - filemtime($urltable_filename)) > ($freq * 86400 - 90))) || (((time() - filemtime($urltable_filename)) > ($freq * 43200 - 90))) ||
        

        'GMX_SMTP_Server' was the table which I wanted to be updated twice a day (43200 - 90).

        Additionally you have to edit the cron job which is executing

        /usr/bin/nice -n20 /etc/rc.update_urltables
        

        and set an appropriate interval.

        However, a pfSense update will overwrite the modification in the file naturally.

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