Squid Time Based Restrictions

FREQUENTLY ASKED QUESTIONS (Linux)
Q: How to enable time based access restrictions in squid proxy server?


    Sometimes you may need to enable a time based access restrictions in your squid server. Squid proxy can do this with "time" access list(ACL). All you need to create a "time" ACL with required time and dates from the week and apply with access restriction ACLs.

Click here for More Advanced Squid posts


Creating time ACL
[root@server ~]# vi /etc/squid/squid.conf
#Configure the time based restrictions like below 
acl james src 192.168.10.66/32
acl officehours time MTWHFA 14:00-17:00
http_access allow james officehours

# Now save the squid.conf file

Where.....
MTWHFA is the days Monday to Saturday in a week
14:00-17:00 is restrict access in between 14:00 to 17:00 (24hr format)

Reload/restart the squid service
[root@server ~]# service squid reload

Now the user james with ip address 192.168.10.66 cannot access the internet from 14:00 to 17:00 Monday to Saturday. You can use the time ACL with any other ACLs to restrict access within the time range.

Was this helpfull ?

0 comments:

Related Posts Plugin for WordPress, Blogger...

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Bluehost Coupons