I’m trying to block a site for a certain time.
I found this by googling
How to Block(deny) perticuler website in certain times of the day , by using squid ? and it seemed promising.
I added the lines to my squid.conf
acl office_time time MTWHF 3:00-21:00
acl bad url_regex "/etc/squid/block.acl
http_access deny bad !office_time
created a block.acl in the same directory and restarted it.
The problem is it isn’t blocking the site.
Here’s my Squid.conf
Maybe I did something wrong, or maybe I’m missing something else?
Or maybe there a better way to tackle this?
Any help would be appreciated.
First off - that is really cool. What a great application for squid!
Your config looks good as far as I can tell, and matches the instructions mentioned in the post.
Did you check the permissions on block.acl to ensure squid can include it? That might be it.
Any errors in the squid log?
The last idea I have is to use something like calamari to monitor the hits / misses on those urls - but that is rather reaching I think: Calamari UI,Yummy Squid - A Squid Proxy Server Reporting Application | www.calamariproject.co.za
Cheers,
Lews Therin
My question would be how you’re verifying the block.
Remember, implementing a web proxy for security reasons (like what you describe) will work only if you configure the IG to block all client direct connections (must force all to use the proxy).
Also, although I haven’t configured squid to do this, typically you have to restart the web proxy to implement new rules (did you restart the service?).
Tony