Parent Category: Tutorials
Hits: 23675


Here is a tutorial for setting up DansGuardian Internet Content Filter with Squid and Clamavis.
Assumed that you already have Squid installed and configured on port 3128 we move to DansGuardian. After you download the code:
# ./configure && make && make install
Make sure that you have this in /etc/dansguardian/dansguardian.conf:
filterip =
filterport = 8080
proxyip =
proxyport = 3128
At this point you can test your DG instalation:
Set up your browser proxy section to proxy ip and port 8080 (not 3128!)  and go to: If all works ok you should not see that page.
Next, let's configure DG to  do a virus check before we access pages. Here are the steps:
1) Open dansguardian.conf and uncomment this line: contentscanner = '/etc/dansguardian/contentscanners/clamdscan.conf'
2) Find  the line LocalSocket in /etc/clamd.conf and put the same socket path in contentscanners/clamdscan.conf at clamdudsfile line.
Also keep in mind that both Clamav and DansGuardian must run as the same user.
For that you should check User line in /etc/clamd.conf and daemonuser, daemongroup lines in /etc/dansguardian/contentscanners/clamav.conf
All looks ok so we can test the configuration with page:
You should see: Virus or bad content detected. Eicar-Test-Signature on page.


We use Hosting and VPS Hosting, from:

We like and trust them.

Good prices, high security.