Scientific Linux 6
Sponsored Link

Run with SquidGuard
2011/03/21
  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 --enablerepo=rpmforge -y install squidguard
 
# install from RPMforge


[root@lan ~]#
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 to access except 'deny'

pass !deny all

# redirect URL

redirect http://www.srv.world/error.html

}

}


[root@lan ~]#
mkdir /var/log/squidguard

[root@lan ~]#
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/


[root@lan ~]#
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


[root@lan ~]#
/etc/rc.d/init.d/c-icap restart

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.
 
Matched Content
 
Tweet