Run with SquidGuard2011/05/28 |
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 20: uncomment and change PATH squidguard /usr/bin/squidGuard
/etc/rc.d/init.d/c-icap restart Restarting c-icap (via systemctl): Stopping c-icap: [ OK ] Starting c-icap: [ OK ] [ OK ] |
[2] | Try to access to Yahoo set as prohibited domain in [1]. Prohibited domain is blicked normally. |
Sponsored Link |