Your own content filter proxy server

Content-control software, also known as censorware or web filtering software, is a term for software designed and optimized for controlling what content is permitted to a reader, especially when it is used to restrict material delivered over the Web.

We will be using open source softwares, best and reliable.

DansGuardian is designed to be completely flexible and allows you to tailor the filtering to your exact needs. It can be as draconian or as unobstructive as you want. The default settings are geared towards what a primary school might want but DansGuardian puts you in control of what you want to block.

Operating system on gateway server:

  • FreeBSD7.0

Softwares:

  1. Squid  (Version 2.6.STABLE16)
  2. DansGuardian 2.8.0.6

Installation and Configuration:

  1. Install squid proxy.
  • cd /usr/ports/www/squid
  • make
  • make install

Now configure your squid proxy: Edit  following file.

/usr/local/etc/squid/squid.conf

Locate the line with folllowing entry:

# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS

acl our_networks src 192.168.1.0/24 192.168.2.0/24
http_access allow our_networks

By default squid is configured to run on port 3128, you can change the default port.

Set the squid to start at the boot time:

Edit /etc/rc.conf file add the following entry:

squid_enable=”YES”

create Swap directories by giving command:

squid -z

Now install and configure Dansguardian:

  1. cd /usr/ports/www/dansguardian
  2. Download source tar ball from Download Dansguardian and copy to /usr/ports/distfiles directory.
  3. make
  4. make install
  5. Edit /usr/local/etc/dansguardian/dansguardian.conf file with following entries:
    # the port that DansGuardian listens to.
    filterport = 8100

    # the ip of the proxy (default is the loopback – i.e. this server)
    proxyip = 127.0.0.1

    # the port DansGuardian connects to proxy on
    proxyport = 3128

  6. Edit /etc/rc.conf file to start dansguardian at boot time, add the following line:
  7. dansguardian_enable=”YES”

Configure trasparent proxy with your firewall rules,
Same configurations apply on Linux, location of configuration file may be changed, if SELinux Enabled then few more changes.

My working content filter server for public.  http://anuj.sytes.net port number 8100

Anuj Singh

About anuj

Don't go for looks; they can deceive. Don't go for wealth; even that fades away. Go for someone who makes you smile because it takes only a smile to make a dark day seem bright.
This entry was posted in Linux and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>