Squid run script on access_denied event
Hi people, I was searching on squid monitoring events and run a script but no real luck.
Do you have any ideas how to solve this? For example, I need a script that will run when event acces denied occurs. Actual script will watch that event and take IP wihch is denied and after 15 minutes it will channge ACL to allow and reconfigure squid. |
Hi there,
One approach to deal particularly with "access denied" events might be to use SquidGuard for the filtering / ACLs, and in particular use it's redirect feature to send the user to a CGI/PHP error page. Within that page you can then trigger the necessary logic to do what you want. Good luck! |
Quote:
Code:
tail -f some-logfile | awk '/some-pattern/ {system("run-some-command")}' Code:
tail -fn0 logfile | \ |
Ah thank you for your ideas. Yes I was first trying to search for squid specific :D, then it came to my mind that Im dealing with TXT file :D not with squid :). Also SquidGuard is interesting approach, Ill let you know when Im done with script. Im slow but will make it work.
|
All times are GMT -5. The time now is 12:15 AM. |