Run with SquidGuard2011/11/14 |
Run Squid with SquidGuard that is a URL redirector. Configure squidClamav first.
|
|
[1] | Install and configure SquidGuard (this config is most simply example) |
[root@lan ~]#
[root@lan ~]# yum -y install squidGuard mv /etc/squid/squidGuard.conf /etc/squid/squidGuard.conf.bk
[root@lan ~]#
vi /etc/squid/squidGuard.conf # create new
dbhome /var/lib/squidGuard/db
logdir /var/log/squidGuard # define a category 'deny' dest deny { # prohibited domain list domainlist deny/domains # prohibited url list urllist deny/urls }
acl {
default { # allow access except 'deny' pass !deny all # redirect URL redirect http://www.srv.world/error.html } } mkdir -p /var/lib/squidGuard/db/deny
[root@lan ~]#
vi /var/lib/squidGuard/db/deny/domains # write domains you'd like to prohibit to access
yahoo.co.jp
example.com
[root@lan ~]#
vi /var/lib/squidGuard/db/deny/urls # write URLs you'd like to prohibit to access
www.yahoo.co.jp/deny/
www.example.com/ squidGuard -C all [root@lan ~]# chown -R squid. /var/lib/squidGuard/db/deny
[root@lan ~]#
vi /etc/squidclamav.conf # line 21: uncomment and change PATH squidguard /usr/bin/squidGuard
systemctl restart c-icap.service Stopping c-icap: [ OK ] Starting c-icap: [ OK ] |
[2] | Try to access to Yahoo set as prohibited domain in [1]. Prohibited domain is blicked normally. |
Sponsored Link |