LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Squid problem with http_access and time acl (https://www.linuxquestions.org/questions/linux-networking-3/squid-problem-with-http_access-and-time-acl-385653/)

mago 11-22-2005 07:43 PM

Squid problem with http_access and time acl
 
Hi,

I recently installed and configure squid and every thing went pretty well until I needed to add some time restrictions.

I got the time acl set to point to a file, and the ip range of the group I need to restrict but when I concatenate them it just ignore me.

Here it is the extract of the squid.conf
Code:


acl max src 192.168.1.203/32
acl stage src 192.168.1.100-192.168.1.110/32
acl clerks src 192.168.1.111-192.168.1.150/32
acl manage src 192.168.1.151-192.168.1.200/32
acl prog src 192.168.1.201-192.168.1.220/32
acl design src 192.168.1.221-192.168.1.230/32
acl rush time "/etc/squidacl/times.txt"


http_access allow !rush max
http_access allow design
http_access allow prog
http_access allow manage
http_access allow stage
http_access allow !rush clerks

http_access deny all

For what I googled this seems to be fine but it just doesn't work

The squid and the machines had the same time zone and all of them syncronize with the same ntp server.


Please drop a line with any ideas or suggestions.

amitsharma_26 11-25-2005 01:11 PM

I think you just want to block or grant access timewise.


Access list format :
acl name time [day-list] [start_hour:minute-end_hour:minute]

[day-list] -->SMTWHFA
S - Sunday M - Monday T - Tuesday W - Wednesday H - Thursday F - Friday A - Saturday

acl night time 17:00-24:00
acl early_morning time 00:00-6:00

Ending time(hour) can never be smaller than starting time.. So in those cases, take 24 hour time clock.
----
acl weekends time SA

For example :

acl myNet src 192.168.55.0/255.255.255.0
acl workdays time MTWHF
# allow web access only on the weekends!
http_access deny workdays
http_access allow myNet

I think now you must have got a good idea n would easily implement it for your needs.

Need some more support.
Feedback.


All times are GMT -5. The time now is 01:55 AM.