Squid Time Based Restrictions

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
acl officehours time MTWHFA 14:00-17:00
http_access allow james officehours

# Now save the squid.conf file

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 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 ?


Related Posts Plugin for WordPress, Blogger...

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