Run with SquidGuard2008/12/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 ~]# yum -y install db4-devel [root@lan ~]# wget http://dag.wieers.com/rpm/packages/squidguard/squidguard-1.2.0-2.rf.src.rpm [root@lan ~]# rpmbuild --rebuild squidguard-1.2.0-2.rf.src.rpm [root@lan ~]# cd rpmbuild/RPMS/i386 [root@lan i386]# rpm -Uvh squidguard-1.2.0-2.rf.i386.rpm Preparing... ################################ [100%] 1:squidguard ################################ [100%] [root@lan i386]# [root@lan ~]# mv /etc/squid/squidguard.conf /etc/squid/squidguard.conf.bk [root@lan ~]# vi /etc/squid/squidguard.conf # create new
# # CONFIG FILE FOR SQUIDGUARD # dbhome /var/lib/squidguard logdir /var/log/squidguard # define a category 'dame' dest dame { # prohibited domain list domainlist dame/domains # prohibited url list urllist dame/urls } acl { default { # allow to access except 'dame' pass !dame all # redirect URL redirect http://www.google.co.jp/ } } [root@lan ~]# mkdir /var/lib/squidguard/dame [root@lan ~]# vi /var/lib/squidguard/dame/domains # write domains you'd like to prohibit to access
yahoo.co.jp example.com [root@lan ~]# vi /var/lib/squidguard/dame/urls # write URLs you'd like to prohibit to access
www.yahoo.co.jp/deny/ www.example.com/ [root@lan ~]# squidGuard -C all # create DB [root@lan ~]# chown -R squid. /var/lib/squidguard/dame [root@lan ~]# vi /etc/squidclamav.conf # line 52: uncomment and change squidguard /usr/bin/squidguard [root@lan ~]# /etc/rc.d/init.d/squid restart Stopping squid: ............. [ OK ] Starting squid: . [ OK ]
|
[2] | Try to access to Yahoo set as prohibited domain in [1]. Prohibited domain is blicked normally. |
Sponsored Link |
|