Squid + DansGuardian2014/06/08 |
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:8080". |
root@prox:~#
apt-get -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 = 8080
# line 92: specify proxy server's IP proxyip = 10.0.0.33
# line 95: specify the port proxy server listens proxyport = 3128
/etc/init.d/dansguardian restart * Restarting DansGuardian dansguardian ...done.
root@prox:~#
vi /etc/squid3/squid.conf # line 1460: change http_port 3128
initctl restart squid3 squid3 start/running, process 14747 |
[2] | Set contents flitering. |
root@prox:~#
vi /etc/dansguardian/lists/bannedsitelist # add the head of the file: specify domains you'd like to prohibit yahoo.co.jp
/etc/init.d/dansguardian restart * Restarting DansGuardian dansguardian ...done. # 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]. |
Sponsored Link |