#
# Configuration file of squidGuard
# --------------------------------
#
# Written by:  Marco Antonio Frias B. <marcofrias@linuxpackages.net>
#
# Changelog:
#
# 0.1: 11/Oct/2008 by Marco Aantonio Frias B. <marcofrias@linuxpackages.net>
#      * Initial write file.
#

# Location of the blacklists
dbhome /var/lib/squidguard

# Location of the logfiles
logdir /var/log/squidguard

# Definition of a category to block. (view /var/lib/squidguard/global_usage)

dest adv {
  domainlist	adv/domains
  urllist	adv/urls
}

dest dating {
  domainlist	dating/domains
  urllist	dating/urls
}

dest gamble {
  domainlist	gamble/domains
  urllist	gamble/urls
}

dest hacking {
  domainlist	hacking/domains
  urllist	hacking/urls
}

dest movies {
  domainlist	movies/domains
  urllist	movies/urls
}

dest music {
  domainlist	music/domains
  urllist	music/urls
}

dest porn {
  domainlist	porn/domains
  urllist	porn/urls
}

dest ringtones {
  domainlist	ringtones/domains
  urllist	ringtones/urls
}

dest lingerie {
  domainlist	sex/lingerie/domains
  urllist	sex/lingerie/urls
}

dest spyware {
  domainlist	spyware/domains
  urllist	spyware/urls
}

dest updatesites {
  domainlist	updatesites/domains
  urllist	updatesites/urls
}

dest violence {
  domainlist	violence/domains
  urllist	violence/urls
}

dest warez {
  domainlist	warez/domains
  urllist	warez/urls
}

dest webphone {
  domainlist	webphone/domains
  urllist	webphone/urls
}

dest webradio {
  domainlist	webradio/domains
  urllist	webradio/urls
}

dest webtv {
  domainlist	webtv/domains
  urllist	webtv/urls
}

# There are two ways to define times and dates where access to websites are
# allowed or disallowed. The weekly directive is used for reoccuring access time,
# f.e. allowing web access to blocked sites after work. Using the date directive
# you can additionally define special days where access may be granted.
# Wildcards can be used.
#
# abbrev for weekdays:
# s = sun, m = mon, t =tue, w = wed, h = thu, f = fri, a = sat

time leisure-time {
  weekly	mtwhf	00:00-08:30 18:30-23:59
  weekly	mtwhf	12:30-14:30
}

# If you have policies in place granting some people access to more sites than
# others you have different options how to implement this policy. One way is to
# define source IP acls. This can only work if your user groups are well
# separated within your network.

src privileged {
  ip	192.168.0.3-192.168.0.4
}

src users {
  ip	192.168.0.11-192.168.0.254
}

# The actual blocking defintion. You can have more than one acl in place.

acl {
  privileged {
    pass	all
  }

  users within leisure-time {
    pass	updatesites !adv !dating !gamble !hacking !porn !lingerie !spyware !violence !warez !in-addr all
  }
  else {
    pass	updatesites !adv !dating !gamble !hacking !movies !music !porn !ringtones !lingerie !spyware !violence !warez !webphone !webradio !webtv !in-addr all
    redirect	http://www.google.com
  }

  default {
    pass	none
    redirect	http://www.google.com
  }
}
