Re: [squid-users] blocking domains certain times of day
* Dan Slinky wrote : > 2009/5/28 Troy Piggins > > > 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? > > with day-abbreviations: > > S - Sunday > M - Monday > T - Tuesday > W - Wednesday > H - Thursday > F - Friday > A - Saturday > > Example > > acl lunchtime time MTWHF 12:30-13:30 Thanks mate. I've actually tested it and was surprised how close I was to being correct. Here's what I ended up with: acl weekends time A S acl lunchtime time 12:30-13:30 acl lunchtime_url dstdomain "/etc/squid3/lunchtime_url.squid" http_access allow lunchtime lunchtime_url http_access allow weekends lunchtime_url http_access deny lunchtime_url Now I just need to figure out how to redirect that "denied" page to one that says "I'm sorry, that website is not allowed during office hours". :) -- Troy Piggins
Re: [squid-users] blocking domains certain times of day
2009/5/29 Troy Piggins > > Now I just need to figure out how to redirect that "denied" page to > one that says "I'm sorry, that website is not allowed during office > hours". :) > try using deny_info http://www.squid-cache.org/Doc/config/deny_info/ HTH S.
Re: [squid-users] blocking domains certain times of day
Troy Piggins wrote: * Dan Slinky wrote : 2009/5/28 Troy Piggins 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? with day-abbreviations: S - Sunday M - Monday T - Tuesday W - Wednesday H - Thursday F - Friday A - Saturday Example acl lunchtime time MTWHF 12:30-13:30 Thanks mate. I've actually tested it and was surprised how close I was to being correct. Here's what I ended up with: acl weekends time A S acl lunchtime time 12:30-13:30 acl lunchtime_url dstdomain "/etc/squid3/lunchtime_url.squid" http_access allow lunchtime lunchtime_url http_access allow weekends lunchtime_url http_access deny lunchtime_url In the spirit of the default squid.conf, you can just use... http_access deny !lunchtime !weekends lunchtime_url ... http_access allow localnet Now I just need to figure out how to redirect that "denied" page to one that says "I'm sorry, that website is not allowed during office hours". :) deny_info ERR_DENY_LUNCHTIME lunchtime_url Where the file ERR_DENY_LUNCHTIME is an HTML document in your error directory. Chris