Fri 21 Jul 2006
DansGuardian and SpamAssassin
Posted by Andrew Mitry under Open Source, Web/Tech
[6] Comments
Two of summer interns, Kyle and Travis, are wrapping up testing on their assigned projects. The first is an open source web content filter, we chose to use DansGuardian running on CentOS 4.3. The second is an open source spam/virus mail filter, we chose to use SpamAssassin and ClamAV, they found a pre-configured gateway called Piratefish which uses both and has good installation documentation.
They wrote up a rough draft on how they got DansGuardian up and running, I’ll post the final version shortly:
-Boot CentOS from disk 1
-choose skip
-choose next about 3 times,
-when it asks for installation type choose server
-automatically partition
-remove all partitions, yes you are sure
-next until firewall configuration, choose no firewall, and disable SELinux
-choose next, then click proceed when asks you to configure firewall
-make root password
-Package Group Selection
Editors
Development tools
-insert disks as needed
-log in as root
-type : ‘yum update’
-use WinSCP and place the webmin package in the root directory
-using putty type the commands:
‘rpm -U webmin-1.290-1.noarch.rpm’
to install webmin
-direct your browser to x.x.x.x:10000 (where x.x.x.x is the IP address of the box)
-click system, software packages, browse yum, type: squid, choose squid and click install
-using WinSCP copy and overwrite the squid config file to /root/etc/squid
-using WinSCP copy the dansguardian package to the root directory
-using WinSCP click networking, linux firewall, and setup a firewall using the defaults
-using putty type these commands:
tar –zxpf dansguardian-2.8.0.6.source.tar.gz
cd dansguardian-2.8.0.6
./configure
make
make install
make clean
cd
service squid start
service dansguardian start
service iptables stop
iptables -t nat -A PREROUTING -i eth0 -p tcp –dport 80 \
-j REDIRECT –to-port 8080
-using WinSCPcopy the html template file into the ‘/root/etc/dansguardian/languages/ukenglish/’ directory
-using putty type : ‘service dansguardian restart’
-using WinSCP copy the ‘dg-0.5.10-pr5.wbm’ file into the root directory
- using webmin, Click on webmin configuration, webmin modules
-install the file you just copied by selecting “from local file†and browsing for it by clicking the “…†button.
-using webmin, click servers, dansguardian, module config, and change the paths by deleting ‘/usr/local’ from any path that contains it.
-using WinSCP copy the ‘blacklists’ folder into ‘/etc/dansguardian/’
-using webmin, click system, scheduled cron jobs, create a new scheduled cron job
Execute as root
Copy the text from the ‘blacklistupdate’ text file into the “input to command†field:
type a command name and description
click the “simple schedule button†and choose “monthly (on the 1st)†from the dropdown menu
click save
-click the name of the cron you just made
-click run now
-edit ‘/etc/dansguardian/bannedsite’ list and remove the ‘#’’s to choose which blacklists you want to use, make sure the ‘#’ is removed before ‘*ip’ to enable IPs be blocked to protect against ‘ping’. Add any sites you wish to block in this file where it says to
-also edit ‘/etc/dansguardian/bannedurllist’ and perform the same basic actions.
-edit the file ‘/etc/rc.d/rc.local’ and add all the text from the ‘squidstartup’ text file.
-take the ‘phraselistsmay31’ file and extract it twice in the ‘/etc/dansguardian’ file
-Go to ‘network connections’ on the workstation you wish to have the internet filtered on, right click ‘local area connection’, click ‘properties’, click ‘Internet Protocol (TCP/IP), click ‘properties’, click ‘advanced’, click add, and add the IP address of the box that filters.
6 Responses to “ DansGuardian and SpamAssassin ”
Comments:
Trackbacks & Pingbacks:
-
Pingback from New Tech for the New School Year » anchorite.org
August 12th, 2006 at 6:25 pm[...] Using DansGuardian for content filtering and SpamAssassin for spam/virus filtering. [...]
-
Pingback from ScrubIT - Basic Content Filtering » anchorite.org
March 1st, 2007 at 1:44 pm[...] ScrubIT looks like a simple way to get basic content filtering on your machine or network, simply by changing your DNS. We have been struggling to find a good content filter solution for the church, we did deploy DansGuardian, but it was quite a bit of work to setup and has a few issues, especially when working with SSL. We were able to start using ScrubIT with just a few seconds of work. [...]


January 22nd, 2007 at 5:32 pm
How is this working for you? I am trying to get it running and I have come into a few snags. In the reporting feature, are you able to see usernames? Do you have LDAP connectivity?
January 23rd, 2007 at 1:12 pm
It is working ok, we only use it for monitoring our computer lab, not the entire facility. We also ran into snags with https sites. To be honest we don’t use the reporting feature and no we do not have LDAP connectivity.
January 24th, 2007 at 5:05 pm
Thanks! It is a very cool product. I probably would not have tried it out without seeing your post, so again, I say thank you!
January 24th, 2007 at 5:08 pm
Your welcome, glad to be of help.