Automatic updates for squidguard blacklist
-
As far as I discovered, blacklists in squidguard have to be updated manually. Would be perfect if there was a possibility for automatic updates, to keep users on the safe side.
-
https://forum.pfsense.org/index.php?topic=35479.0
-
Thanks Geek!
It was a few minutes puzzling, but I think it's configured right now. The only thing left is to Save and Apply the squidguard configuration to apply the new database. I'm looking for a script to do that (or a script to reboot pfsense once a day at, for example, 4 a.m. Any solutions/suggestions?
Greetings, Sourcefinder
-
And, I'm ashamed to admit, but I don't know in what log to look to check wether the database has been updated…
-
The original thread referenced here is locked so I thought I would post a slight improvement to the original method described of copying the update script manually and creating a cronjob. No need to log in with SSH, just create a cron job with this exact command line which runs as root:
/bin/cp /tmp/squidGuard_blacklist_update.sh /usr/local/bin/;/usr/local/bin/squidGuard_blacklist_update.sh
Why do the copy every time in the cron job ? Simple - if you manually copy the script one time and ever change the blacklist download URL in the future, the cron job will keep using the original URL at the time you copied the script as it is embedded in the script...this would lead to confusing and unexpected results given that the Download button would use the new URL.
Running the script directly from /tmp is not an option either, because the script is only created in /tmp when the manual blacklist download button is pressed and is gone again if you ever reboot the device, so automatic updating would stop working after a reboot until you pressed the manual download button because the script would be missing.
Attempting to copy the file every time is simple and is the best of both worlds - if the URL was updated, as long as you pressed the manual download button at least once before the next scheduled auto update and also did not reboot the device before that scheduled auto update, the file would be copied and automatic updates would work from then on with that URL even after reboots. (The file copy fails silently in the after-reboot but before manual download scenario but the previous copy is still there in /usr/local/bin)
-
-
-
Thanks for the info, it's working great. 9:29 AM test ran automatically.
-