[K12OSN] Squid & Content filtering

Michael Williams mwilliams at haywood.k12.nc.us
Wed Oct 20 18:27:20 UTC 2004

> Hello,
> I have installed (Finally!) K12 LTSP and it is working great!  I had a
> bad CD player, took me weeks to figure that out (I'm not worthy to be a
> geek anymore!)  :-)
> Now my question is Squid and Content filtering.  I have been unable to
> get Squid to work, I'm not really sure where to look or what to do to
> get started, can anyone point me in the right direction?  (ie. websites
> with HOWTO's or something)  I'd really appreciate it.

I am setting up squid and dansguardian using the following instructions:

Install RedHat with standard base packages and the following packages
I didn't have any luck with the following wget commands, so I went to the
respective sites and downloaded..
8.install webmin
rpm -Uvh webmin-1.150-1.noarch.rpm

then download and install DansGuardian
rpm -Uvh DansGuardian-2.6.1-5.RH9.i386.rpm
go in to squid.conf file and add these lines .. /etc/squid/squid.conf

httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_single_host off
httpd_accel_with_proxy on
httpd_accel_uses_host_header on

then execute the following commands is root
iptables -t nat -A PREROUTING -m tcp -p tcp --dport 80 -j REDIRECT
--to-port 8080
iptables -t nat -A PREROUTING -m tcp -p tcp --dport 443 -j REDIRECT
--to-port 8080
iptables -A INPUT -m tcp -p tcp -s ! --dport 3128 -j DROP
/etc/init.d/iptables save

then add or update the following lines in the /etc/sysctl.conf file
net.ipv4.ip_forward = 1
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.eth0.send_redirects = 0

then use these commands to make sure squid and DansGuardian run at boot
chkconfig on squid
chkconfig on dansGuardian
now you must go to the bannedextensionlist file and open it and remove the
lines *.cab and *.exe if u want windows update to work
now test it by starting squid and dansGuardian
/etc/rc.d/init.d/squid start
/etc/rc.d/init.d/dansguardian start



Michael Williams                   Haywood County Schools
Technology Director               Instructional Technology
http://www.haywood.k12.nc.us         (828) 627-8314

More information about the K12OSN mailing list