Free Web Content Filtering
Rants, posted: 15-Jun-2006 17:57
Thought I'd show you all how shocking my english is and try to document how I setup web content filtering at a Primary School, without paying a cent for software. It's a real home-brew solution compared to commerical software but it's very fast and does the job just as well.
Prerequesites:
Basic Linux/UNIX knowledge (apt-get install doesn't count)
An Internet connection
Any Linux system with GCC
Installation:
1. Download and/or setup squid. (might blog how to do this another day)
2. Goto http://www.dansguardian.org and download the DG source code. Extract it (tar zxvf <filename>)
3. configure dansguardian (./configure --help to look at compilation options)
4. if you downloaded DG version 2.9.7.1 you might need to modify some code to make it work. hopefully this will be fixed in the next release. in the src/ directory, using your favorite text editor make the following changes to ListContainer.cpp
Line number 50: #define GRAPHENTRYSIZE 128 //was 64
Line number 968: ppos = pos << 7; //was 8
5. save those changes and run make in the top level of the sources directory.
6. as root, make install
Configuration:
DG is quite easy to configure and the configuration files installed when you 'make install' are well commented.
start by editing dansguardian.conf which with default configure options will be installed in /usr/local/etc/dansguardian
the vital settings to change are:
filterport = # 8080 is a good choice
proxyip = 127.0.0.1 #this must be where your squid is serving
proxyport = # 3128 is squid default
accessdeniedaddress = #it usually helps to have apache running on the filtering server, set an apache hostname in here that has this file in it's cgi-bin directory.
BTW when configuration files are read, # denotes a comment until the line's end.
to start dansguardian run /usr/local/sbin/dansguardian
to stop dansguardian run /usr/local/sbin/dansguardian -q
when you first start DG, wait 30 seconds then do a 'ps aux' to double check it is running, then try it with your proxy clients.
if it worked, congratulations! if only beer was this free =)
If you want to elaborate on this software, checkout http://urlblacklist.com
they have a script that updates DG to the latest blacklists available and is reasonably priced with a free trial.
Good luck, Linux hackers.
Prerequesites:
Basic Linux/UNIX knowledge (apt-get install doesn't count)
An Internet connection
Any Linux system with GCC
Installation:
1. Download and/or setup squid. (might blog how to do this another day)
2. Goto http://www.dansguardian.org and download the DG source code. Extract it (tar zxvf <filename>)
3. configure dansguardian (./configure --help to look at compilation options)
4. if you downloaded DG version 2.9.7.1 you might need to modify some code to make it work. hopefully this will be fixed in the next release. in the src/ directory, using your favorite text editor make the following changes to ListContainer.cpp
Line number 50: #define GRAPHENTRYSIZE 128 //was 64
Line number 968: ppos = pos << 7; //was 8
5. save those changes and run make in the top level of the sources directory.
6. as root, make install
Configuration:
DG is quite easy to configure and the configuration files installed when you 'make install' are well commented.
start by editing dansguardian.conf which with default configure options will be installed in /usr/local/etc/dansguardian
the vital settings to change are:
filterport = # 8080 is a good choice
proxyip = 127.0.0.1 #this must be where your squid is serving
proxyport = # 3128 is squid default
accessdeniedaddress = #it usually helps to have apache running on the filtering server, set an apache hostname in here that has this file in it's cgi-bin directory.
BTW when configuration files are read, # denotes a comment until the line's end.
to start dansguardian run /usr/local/sbin/dansguardian
to stop dansguardian run /usr/local/sbin/dansguardian -q
when you first start DG, wait 30 seconds then do a 'ps aux' to double check it is running, then try it with your proxy clients.
if it worked, congratulations! if only beer was this free =)
If you want to elaborate on this software, checkout http://urlblacklist.com
they have a script that updates DG to the latest blacklists available and is reasonably priced with a free trial.
Good luck, Linux hackers.
Hello world
Rants, posted: 12-Jun-2006 16:56
Hello world!