Setting Up Webcontent Filtering with Dansguardian

dansguardian

I’ve just setup web content filtering in my ubuntu server with the help of Dansguardian.

Dansguardian is a web-content filtering application which communicates with your proxy server. I’m using it with my squid proxy.

Before you continue, you need to setup the squid proxy server first. Once this is ready you can go ahead with the Dansguardian installation.

Steps to install it in Ubuntu:

Note: Before you begin make sure you have the root access. Without this you can’t perform some of the configuration.

1. In your ubuntu terminal run “apt-get install dansguardian” and select “yes” to install it in your machine.

2. Once downloaded proceed with the editing by running “vi /etc/dansguardian/dansguardian.conf”

3.  Comment out the UNCONFIGURED by removing # from #UNCONFIGURED line in the dansguardian.conf file.

4.  In the same file find the line with “proxyip” and “proxyport. Change this line to point your current squid proxy server’s IP address and port number.

Note: Remember dansguardian uses port 8080. You need to enable this port in your firewall or else you can change this port to some other port by changing it in the dansguardian.conf file.

5.  Now to make your dansguardian started in the startup, run “update-rc.d dansguardian defaults

6. Final step is to restart your dansguardian by issuing “/etc/init.d/dansguardian restart” in your terminal.

7. Point your browser’s proxy configuration to your current dansguardian server’s IP address and port number “8080”.

Now you have get the dansguardian ready, so how do you test it? There are sample filtering method found in your “/etc/dansguardian/list/ folder. You can use one of this to test your installation.

On my end I have test the site banned method with the bannedsitelist sample. Edit the file bannedsitelist and add in the site detail.

Example “friendster.com

Then restart your dansguardian by following the above step 6.

Once your restart executed try to access http://friendster.com. It will be blocked and showed the Access Denied page.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s