Timed access to squid
Gud afternoon guys! I just installed squid and I've been doin' a lot of experiments on it lately coz I find it really interesting. However, I stumble upon a really cool feature, that is, squid's timed access to users. I am assigned to maintain the proxy server that is setup here in our school and I think, this feature would really help.
The problem is I tried using this code, hoping it would deny connections to the sites inside "timed_sites.txt" from mon-sat 8:30-12:00 and mon-fr 13:30-17:00.... acl timed_sites url_regex "/etc/squid/timed_sites.txt" acl office_hours_am time MTWHFS 8:30-12:00 acl office_hours_pm time MTWHF 13:30-17:00 http_access deny timed_sites office_hours_am http_access deny timed_sites office_hours_pm but it doesn't work... :( |
The syntax of your acl and http_access statements is the same as I'm using on a box here - so that shouldn't be the problem. Have you checked the location and format of /etc/squid/timed_sites.txt? The sites should be listed one per line.
Also, the order of the http_access statements is important. Do you have any statements prior to those in your squid.conf file that could already have allowed access? |
my squid rules worked when i used this line
acl timed_sites url_regex "/squid/etc/timed_sites.txt" acl office_hours time M T W H F S 8:30-12:00 1:30-5:00 http_access deny office_hours timed_sites however, when i changed the rules so that users will be allowed to access the sites on Saturday afternoon. I used this code: acl office_hours_am time M T W H F S 8:30-12:00 acl office_hours_pm time M T W H F 13:30-5:00 http_access deny timed_sites office_hours_am http_access deny timed_sites office_hours_pm and then did /squid/sbin/squid -k reconfigure but squid allowed access to timed_sites. Could this be a bug on the side of squid? Btw, these lines were placed on top of other http_access lines so that it would be evaluated first. |
follow-up msg:
I placed the original code back: acl timed_sites url_regex "/squid/etc/timed_sites.txt" acl office_hours time M T W H F S 8:30-12:00 1:30-5:00 http_access deny office_hours timed_sites but still the same thing happened, it still allowed access to timed_sites. |
Quote:
-- Prasanta |
All times are GMT -5. The time now is 04:48 AM. |