AOA
Dear All
I am using squid as a cache server. I want to use time base restriction on users.
Allow time period for different groups is as follow:
12Hrs 0800 - 2000 (08:00 AM - 08:00 PM)
14Hrs 0800 - 2200 (08:00 AM - 10:00 PM)
08Hrs 0830 - 1730 (08:30 AM - 05:30 PM)
Other than this time restriction can block net access.
Please guide.
Time Restriction using "SQUID"
Time Restriction using "SQUID"
Thanks & Regards
Muhammad Ali
Muhammad Ali
squid's configuration file gives you all the information you need to set those acls. all you have to do is create the acls as
Code: Select all
acl twelvehour ...
acl fourteenhour ...
acl eighthour ...
http_access allow group1 twelvehour
http_access allow group2 fourteenhour
http_access allow group3 eighthour
http_access deny all # default, already in your config file
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
Dear Lambda
I am still confused, I have put this in my squid.conf file. I have set the time period
acl off_hrs8 src 1.2.3.4
acl off_hrs14 src 1.2.3.5
acl off_hrs12 src 1.2.3.6
acl hrs8 time MTWHFA 08:30-17:30
acl hrs14 time MTWHFA 08:00-22:00
acl hrs12 time MTWHFA 08:00-20:00
http_access allow hrs8 off_hrs8
http_access allow hrs14 off_hrs14
http_access allow hrs12 off_hrs12
http_access allow off_hrs8
http_access allow off_hrs14
http_access allow off_hrs12
http_access deny all
it not working
Please guide, I just want that browsing should be only available with in this time period.
I am still confused, I have put this in my squid.conf file. I have set the time period
acl off_hrs8 src 1.2.3.4
acl off_hrs14 src 1.2.3.5
acl off_hrs12 src 1.2.3.6
acl hrs8 time MTWHFA 08:30-17:30
acl hrs14 time MTWHFA 08:00-22:00
acl hrs12 time MTWHFA 08:00-20:00
http_access allow hrs8 off_hrs8
http_access allow hrs14 off_hrs14
http_access allow hrs12 off_hrs12
http_access allow off_hrs8
http_access allow off_hrs14
http_access allow off_hrs12
http_access deny all
it not working
Please guide, I just want that browsing should be only available with in this time period.
Thanks & Regards
Muhammad Ali
Muhammad Ali
Code: Select all
acl off_hrs8 src 1.2.3.4
Code: Select all
acl hrs8 time MTWHFA 08:30-17:30
Code: Select all
http_access allow hrs8 off_hrs8
Code: Select all
http_access allow off_hrs8
are your surprised that it doesn't work?
take the time to think. in the end, who's responsible for thinking for you? who's responsible for doing your job, but you? in your original post, you wrote
why, then, do you have the "http_access allow off_hrs8" allow rule?Other than this time restriction can block net access.
try to understand what you're doing instead of blindly writing rules and hoping (praying) that it'll work. computers are not magic. learn the rules, and follow them.
Watch out for the Manners Taliban!
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?
Isn't it amazing how so many people can type "linuxpakistan.net" into their browsers but not "google.com"?