Setting Specific Time & Day for Browsing


The following lines have been taken from the file squid.conf. Each day can be represented by an alphabet. Moreover,browsing time can be limited using h1:m1 – h2:m2 parameters, where h1:m1 > h2:m2.
#acl aclname time [day-abbrevs] [h1:m1-h2:m2]
# day-abbrevs:
# S - Sunday
# M - Monday
# T - Tuesday
# W - Wednesday
# H - Thursday
# F - Friday
# A - Saturday
# h1:m1 must be less than h2:m2

# /etc/squid/squid.conf

acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8
acl time_limit time SMTWH 10:00 – 14:00
acl our_network src 192.168.200.0/24
http_access deny our_network time_limit
http_access deny all

Example: allow browsing during office hours only

# /etc/squid/squid.conf

acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8

acl office_hours time SMTWH 08:00-18:00
acl non_office_hours time SMTWHFA 17:01-00:00
acl non_office_hours time SMTWHFA 00:00-08:59


acl our_network src 192.168.200.0/24

http_access deny our_network non_office_hours
http_access allow our_network office_hours


http_access deny all

Comments

Popular posts from this blog

Squid Configuration

Squint Configure

Postfix SASL authentication with SMTP port 465:

How to Change the Logo from Zimbra Admin Console