Administrators can use various methods to block access to websites that are pornographic in nature, like URL Filter, URL Blacklist, Keyword Filter, etc. But many porn sites allow users to register their email IDs on their website and deliver the latest images and pictures to their personal emails. So if a user is allowed access to his personal mail, he can enjoy himself without having to access any porn site. Such images are also regularly displayed as ads and banners on other web pages, that might not be pornographic in nature.
Pornographic Image Filter can analyze an image in real-time, and identify the ones that are pornographic in nature. It analyzes the graphical content like skin tone, contour, etc. to identify a pornographic image. It is a commercially distributed add-on plug-in and can be used with SafeSquid to block pornographic images. Although it is about 85%-90% accurate, it acts as a good deterrent.
Follow the procedure below to install Pornographic Image Filter and use it with SafeSquid:
Download the trial Pornographic Image Filter Add-on Module from the SafeSquid Downloads Page and copy it to a directory on the SafeSquid Server, e.g. in /usr/local/src.
The add-on module is about 11MB in size and although it is an expired trial version, you can install the files. Once the installation is complete, you can request for fresh trial binary files by sending a request email to information@safesquid.net. Just replace the files that you receive in the installation directory.
Change directory to /usr/local/src
cd /usr/local/src
Untar the file imagefilter.trial.20080730.tar.gz
tar -xzvf imagefilter.trial.20080730.tar.gz
Change directory to imagefilter.trial.20080730.tar.gz
cd imagefilter.trial.20080730
The directory contains the following files:
drwxr-xr-x 3 root root 4096 Sep 4 17:26 imgfilter
-rwxr-xr-x 1 root root 20168 Sep 4 17:28 imgfilter.so
-rw-r--r-- 1 root root 2087 Sep 4 17:30 imgfilter.xml
-rw-r--r-- 1 root root 872160 Sep 4 17:28 libimgfilter.so
Create 'imgfilter' directory in /opt/safesquid/modules/
mkdir /opt/safesquid/modules/imgfilter
Copy the files to /opt/safesquid/modules/imgfilter
cp imgfilter.so /opt/safesquid/modules/imgfilter
cp imgfilter.xml /opt/safesquid/modules/imgfilter
cp libimgfilter.so /opt/safesquid/modules/imgfilter
cp -r imgfilter /opt/safesquid/modules/imgfilter
Create symbolic links for loading image filter module
cd /opt/safesquid/modules
ln -fs /opt/safesquid/modules/imgfilter/imgfilter.so imgfilter.so
ln -fs /opt/safesquid/modules/imgfilter/imgfilter.xml imgfilter.xml
ln -fs /opt/safesquid/modules/imgfilter/libimgfilter.so /lib/libimgfilter.so
Restart SafeSquid
/etc/init.d/safesquid restart
Now when you access the SafeSquid Interface, you should find a new section 'Image filter' under 'Config'.
When you request for a fresh trial copy, you will receive the file imgfilter.so.
Just copy this file to /opt/safesquid/modules/imgfilter
This will renew your trial period.
Now, to configure the Image filter section in the SafeSquid Interface, go to Config => Image filter.
You will see a screen similar to this:
imgfilter section
Image filtering will classify images based on their likelihood of containing pornographic material.
Option Value
Library path
Default template
Image filters
Add
Click on Add under the Image filters subsection to add a new filter rule.
Option Value
Enabled Yes: No:
Comment
Profiles
Threshold
Template
Specify the Profiles to which you want to apply this rule.
Leave it blank to apply to all.
You can configure the sensitivity of the filter by specifying the Threshold option.
Image filter allocates a score to all the images that it analyzes. -10.0 is unlikely to be porn whereas 0.0 is very likely.
To start with, keep the Threshold value 0.0. You can then fine tune the filter by altering this value.
You can also create multiple rules, with different Threshold limits for different Profiles.
When an image is blocked, it will appear as a blank box. You can also replace a blocked image with a custom image.
For example, if you fill in the Default template value with checkeredgif, which is a custom image that comes with SafeSquid, the image will be replace with a checkered box, as shown below:
No comments:
Post a Comment