[squid-users] blocking domains certain times of day

From: Troy Piggins <troy_at_piggo.com>
Date: Fri, 29 May 2009 08:46:37 +1000

Hi there. I'm very new to setting up acls and http_access etc. To
date I've pretty much only set up the default Ubuntu squid.conf as a
transparent proxy through iptables.

I now want to implement something a little more complicated, for me
anyway. I want to block access to certain websites during work
hours, but allow them during lunchbreaks and weekends. Sites like
facebook etc.

I've googled several pages on how to block facebook outright, but
not to allow it 12:30 to 1:30 weekdays and allow on weekends for
example.

I have set up a file /etc/squid3/lunchtime_url.squid[1]. Are
comments allowed? Do you need the preceding ".", or can you just
have "facebook.com" to block the whole site?

I haven't tested this, and don't think it's quite right, but am I on
the right track with:

acl lunchtime time 12:30-13:30
acl lunchtime_url dstdomain "/etc/squid3/lunchtime_url.squid"

http_access allow lunchtime lunchtime_url
http_access deny lunchtime_url

How do I add the lunchtime requirement for weekdays only, and allow
all day on weekends?

[1]
#.unsure_about_this_domain.com
.facebook.com
.hotmail.com

-- 
Troy Piggins
Received on Thu May 28 2009 - 22:44:59 MDT

This archive was generated by hypermail 2.2.0 : Fri May 29 2009 - 12:00:02 MDT