If you are new to linux, don't worry. It may look like much, but it isn't. Also where it says vi you can use nano instead.
Why
I bought the bubba2 to act as a transparent proxy so all http request can be monitored.
In combination with squidGuard, this gives me and my family members unlimited access to the internet without having to worry about the bad sites or bad guys.
Packages
Install the packages and some nice utilities which are handy
Code: Select all
apt-get install squid squid-cgi squidclient squidguard squidviewCode: Select all
cd /tmp
wget ftp://ftp.univ-tlse1.fr/pub/reseau/cache/squidguard_contrib/blacklists.tar.gzSetup transparent squid proxy
Code: Select all
vi /etc/squid/squid.confhttp_port 3128
replace with/add:
http_port <lan ip>:3128 transparent
search for :
always_direct
replace with/add:
always_direct allow all
search for :
#acl our_networks src
replace with/add:
acl lan src <wan ip> 192.168.1.0/24
http_access allow localhost
http_access allow lan
Setup routing
Code: Select all
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j DNAT --to <lan ip>:3128
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
Code: Select all
/etc/init.d/squid restartSquidquard
Setting up the blacklists
Code: Select all
cd /var/lib/squidguard/db
gzip -d /tmp/blacklists.tar.gz
tar xvf /tmp/blacklists.tarthis can be as simple and complex as you want and there are many blacklisted categories, see also [3] and [4].
So I only give a simple example here.
Code: Select all
vi /etc/squid/squidGuard.confdbhome /var/lib/squidguard/db
logdir /var/log/squid
dest aggressive {
domainlist blacklists/aggressive/domains
urllist blacklists/aggressive/urls
log aggressiveaccesses
}
acl {
default {
pass !aggressive all
redirect http://localhost/block.html
}
}
Code: Select all
echo "Blocked site!">/home/web/block.htmlCode: Select all
chown -R proxy:proxy /var/lib/squidguard/db/*
squidGuard -C all
chown -R proxy:proxy /var/lib/squidguard/db/*
Code: Select all
echo "redirect_program /usr/bin/squidGuard -c /etc/squid/squidGuard.conf" >> /etc/squid/squid.confCode: Select all
/etc/init.d/squid restartAutomatic updates
see http://forum.excito.net/viewtopic.php?p=7409#7409
Have fun
Eek
References
1. squid : http://www.squid-cache.org/
2. http://www.lesismore.co.za/2008/02/squi ... proxy.html
3. squidGuard: http://www.squidguard.org/index.html
4. blacklists: http://cri.univ-tlse1.fr/blacklists/index_en.php