yum install squid
chkconfig squid on
acl localnet src 192.168.1.0/24 http_access allow localnet cache_mem 256 MB maximum_object_size 160384 KB fqdncache_size 10240 cache_dir ufs /var/spool/squid 20000 16 256 visible_hostname unknown forwarded_for off
function FindProxyForURL(url,host) { if(isPlainHostName(host)|| isInNet(host,"192.168.0.0","255.255.0.0")) return "DIRECT"; else return "PROXY 192.168.0.10:8080; DIRECT"; }
function FindProxyForURL(url,host) { // return "PROXY proxy.foo.hoge:8080; proxy2.foo.hoge:8080; DIRECT"; return "PROXY proxy.foo.hoge:8080; proxy2.foo.hoge:8080"; }
yum install squidguard
url_rewrite_program /usr/bin/squidguard -c /etc/squid/squidguard.conf
wget http://www.shallalist.de/Downloads/shallalist.tar.gz
tar xzfv shallalist.tar.gz
mv BL/* /var/lib/squidguard/db/
dbhome /var/lib/squidguard/db logdir /var/log/squidguard dest adv{ domainlist adv/domains urllist adv/urls } dest porn { domainlist porn/domains urllist porn/urls } acl { default { pass !adv !porn all redirect http://admin.foo.bar.de/cgi/blocked?clientaddr=%a+clientname=%n+clientuser=%i+clientgroup=%s+targetgroup=%t+url=%u } }
chown -R squid:squid /etc/squidguard/squidguard.conf
squidguard -C all
chown -R squid:squid /var/lib/squidguard/db
/etc/init.d/squid restart
LC_TIME="en_US.UTF-8"