# ---------------------------------------------------
# squidGuard.conf written by Henning B***, July 2006
#
# A very good explanation on how to write rules is
# available @ http://www.squidguard.org/config/
#
# !!! IMPORTANT !!!
# Whenever you change settings in here, make sure
# you run 'squid -k reconfigure'
# There is NO reason to restart the squid process!
#
# If you have any questions feel free to contact me
# at me (at) my-domain (dot) tld
# ---------------------------------------------------
# ---------------------------------------------------
# Location of the logfile and the squidGuard-db
# ---------------------------------------------------
logdir /var/log/squidGuard
dbhome /etc/squidGuard/db
# ---------------------------------------------------
# Delcaration of the different workinghours based
# on Sydney Time
# ---------------------------------------------------
time NZ_workinghours {
# Forenoon
weekly mtwhf 06:00-11:00
# Afternoon
weekly mtwhf 12:00-15:00
}
time AU-West_workinghours {
# Forenoon
weekly mtwhf 10:00-15:00
# Afternoon
weekly mtwhf 16:00-19:00
}
time AU-East_workinghours {
# Forenoon
weekly mtwhf 08:00-13:00
# Afternoon
weekly mtwhf 14:00-17:00
}
# ---------------------------------------------------
# Definition of different sources. Double assignments
# are possible, but the first rule will hit first.
# Eg. If you decide to give special rights to a
# specific branch ip, make sure to declare it
# BEFORE the branch ip ranges are declared!
# --------------------------------------------------
src admin {
ip 10.x.x.0/23
}
src SYD_Branch {
ip 10.x.x.0/23
}
src MEL_Branch {
ip 10.x.x.0/23
}
src ADL_Branch {
ip 10.x.x.0/23
}
src BNE_Branch {
ip 10.x.x.0/23
}
src PER_Branch {
ip 10.x.x.0/23
}
src AKL_Branch {
ip 10.x.x.0/23
}
src WEL_Branch {
ip 10.x.x.0/23
}
src BKG_Branch {
ip 10.x.x.0/23
}
src VPZ {
ip 10.x.x.0/255.255.25x.x
}
src HH {
ip 192.x.x.x/255.255.x.x
}
# -----------------------------------------------------------------------------------------------
# Specific definition of destinations in the net.
# If you add/delete domains in the file make sure to
# run the commands in the following order after
# editing:
# squidGuard -c /etc/squidGuard/squidGuard.conf -C /etc/squidGuard/db/.../domains
# chown squid:users /etc/squidGuard/db/.../*
# squid -k reconfigure
# "..." stands for the path to the directory, where the domains file exits.
# Eg. You edited the alltime banned domain list and want to include them in the
# running squid session.
# squidGuard -c /etc/squidGuard/squidGuard.conf -C /etc/squidGuard/db/banned/alltime/domains
# chown squid:users /etc/squidGuard/db/banned/alltime/*
# squid -k reconfigure
# -----------------------------------------------------------------------------------------------
dest Alltime_Banned {
# -----------------------------------
# Domains/URLs/Expressions in this
# dest are banned without exception.
# -----------------------------------
# Which database is used for this rule
domainlist banned/alltime/domains
# Log into /var/log/squidGuard/...
log alltime_banned.log
}
dest Workinghour_Banned {
# ----------------------------------
# Domains/URLs/Expressions in this
# dest are only banned during normal
# working hours.
# ----------------------------------
# Which database is used for this rule
domainlist banned/workinghours/domains
# Log into /var/log/squidGuard/...
log workinghour_banned.log
}
# ---------------------------------------------------
# In the section below, you will find the ACLs.
# Metasyntax:
# src [within/outside] [time]
# pass/block [!dest] all
# [} else block {]
# }
# IMPORTANT: Make sure to include a default rule!
# --------------------------------------------------
# Global Wellington Branch Rules
WEL_Branch within NZ_workinghours {
pass !Workinghour_Banned !Alltime_Banned all
redirect http://url-to-nice-banned-page.cgi
} else {
pass !Alltime_Banned all
redirect http://url-to-nice-banned-page.cgi
}
# Global Auckland Branch Rules
AKL_Branch within NZ_workinghours {
pass !Workinghour_Banned !Alltime_Banned all
redirect http://url-to-nice-banned-page.cgi
} else {
pass !Alltime_Banned all
redirect http://url-to-nice-banned-page.cgi
}
# Global Sydney Branch Rules
SYD_Branch within AU-East_workinghours {
pass !Workinghour_Banned !Alltime_Banned all
redirect http://url-to-nice-banned-page.cgi
} else {
pass !Alltime_Banned all
redirect http://url-to-nice-banned-page.cgi
}
# Global Melbourne Branch Rules
MEL_Branch within AU-East_workinghours {
pass !Workinghour_Banned !Alltime_Banned all
redirect http://url-to-nice-banned-page.cgi
} else {
pass !Alltime_Banned all
redirect http://url-to-nice-banned-page.cgi
}
# Global Adelaide Branch Rules
ADL_Branch within AU-East_workinghours {
pass !Workinghour_Banned !Alltime_Banned all
redirect http://url-to-nice-banned-page.cgi
} else {
pass !Alltime_Banned all
redirect http://url-to-nice-banned-page.cgi
}
# Global Brisbane Branch Rules
BNE_Branch within AU-East_workinghours {
pass !Workinghour_Banned !Alltime_Banned all
redirect http://url-to-nice-banned-page.cgi
} else {
pass !Alltime_Banned all
redirect http://url-to-nice-banned-page.cgi
}
# Global Perth / Fremantle Branch Rules
PER_Branch within AU-West_workinghours {
pass !Workinghour_Banned !Alltime_Banned all
redirect http://url-to-nice-banned-page.cgi
} else {
pass !Alltime_Banned all
redirect http://url-to-nice-banned-page.cgi
}
# Global Admin Rules
admin {
pass all
redirect http://url-to-nice-banned-page.cgi
}
default {
pass none
redirect http://url-to-nice-banned-page.cgi
}
}