Debian 8 Jessie
Sponsored Link

Squid + DansGuardian2015/05/20

 
Install DansGuardian to configure web contents filtering.
[1] Install and configure DansGuardian.
For example, the proxy settings on ClientPC is set as "prox.srv.world:3128".
root@prox:~#
aptitude -y install dansguardian
root@prox:~#
vi /etc/dansguardian/dansguardian.conf
# line 5: comment out

#
UNCONFIGURED - Please remove this line after configuration
# line 27: change to your language

language = '
japanese
'
# line 89: specify the port DansGuardian listens

filterport =
3128
# line 92: specify proxy server's IP

proxyip =
10.0.0.34
# line 95: specify the port proxy server listens

proxyport =
8080
root@prox:~#
vi /etc/squid3/squid.conf
# line 1613: change

http_port
8080
root@prox:~#
systemctl restart squid3

root@prox:~#
systemctl restart dansguardian
[2] Set contents flitering.
root@prox:~#
vi /etc/dansguardian/lists/bannedsitelist
# add to the head of the file: specify domains you'd like to prohibit

example.com
root@prox:~#
systemctl restart dansguardian
# other available lists
bannedextensionlist
⇒ banned edextension

bannediplist
⇒ banned client IP address

bannedmimetypelist
⇒ banned MIME Type

bannedphraselist
⇒ banned phrase

bannedregexpheaderlist
⇒ banned header(regexp)

bannedregexpurllist
⇒ banned URL(regexp)

bannedsitelist
⇒ banned domain

bannedurllist
⇒ banned URL

contentregexplist
⇒ replace contents(regexp)

exceptionextensionlist
⇒ exception extension

exceptionfilesitelist
⇒ exception file domain

exceptionfileurllist
⇒ exception file URL

exceptioniplist
⇒ exception client IP address

exceptionmimetypelist
⇒ exception MIME Type

exceptionphraselist
⇒ exception phrase

exceptionregexpurllist
⇒ exception URL(regexp)

exceptionsitelist
⇒ exception domain

exceptionurllist
⇒ exception URL

filtergroupslist
⇒ filter group

greysitelist
⇒ grey domain

greyurllist
⇒ grey URL

[3] Try to access to the URL you set as prohibited domains in [1].
Matched Content