My Location Message Board E-Mail
pcbypaul
pc software, repair
      return to
    Homepage
bg





 
WP Clipart
Windows Compatible Linux Compatible
WP Clipart   caviewer

Windows Install

Linux Install

Help

Windows Compatible Linux Compatible
pAgenda   pAgenda

Help

Install

Changelog

Linux Compatible
AbsVolume   AbsVolume

ReadMe

Linux Compatible
SVGpage   SVGpage

ReadMe

Installation

Changelog

Windows Compatible Linux Compatible
Multiplication Flash   mFlash

ReadMe

Installation

Changelog

Linux Compatible
LinHDD   linHDD

Installation

Changelog

Linux Compatible
GAMMApage   GAMMApage

Installation

Changelog

Create icc profiles

Linux Compatible
monica   Monica

Readme

Installation

Changelog

Linux Compatible

HTMLpage   HTMLpage

table-ify

Install

Help

Linux Compatible

FONTpage   FONTpage

install

changelog

Linux Compatible
wxFontView

Changelog

Linux Compatible
5ball   5Ball

Manual

Changelog

Linux Compatible
Parental Control
Parental Control Software...


for use on a recent Slackware installation.

A two-tiered solution. The pillar is squid (a proxy caching server) along with Apache and db4 and openldap and squidGuard. A bit of a mess to set up from scratch, but I packaged and configured them for use on a solo PC connected to the internet directly or through a LAN/router.

The packages listed below will set the whole thing up for you and the filters are set to block any porn. But you can add to that immensely, if you so desire. The only things you have to configure by hand is to set Firefox to a proxy server (easy, and described below) and put a couple lines in a startup file to crank up the filters.

The second tier of the blocking is a nice extension to Firefox called "BlockXXX", which basically searches for porn from the text before displaying a page, and will then not show any images or links on that page.



Let's start with squid

This is a caching proxy server that will grab what you get from the internet and serve it back to you on a port of your choosing. In this manner the Web content can be filtered before it reaches you.
In the setup I have for download here, db4 and openldap are support files, squid proxies, squidguard processes the content, and Apache serves a "blocked page" if tagged content is found. Before I bore you to death, here is a screenshot of Apache displaying a "blocked page":








As you can see, Firefox was sent to the url "http://sexsex.com", but since this is listed in the adult/domains database, the user was redirected to the "blocked" page. (Made the picture from a crummy photo in the Gimp. Gave me a chuckle . . .) You can specify different and/or additional databases (included) with which to filter content. I won't deatail all the nuances here, documentation is included. But there are just a few things to keep in mind to set this thing up.
  1. There are 5 packages to install. Openldap, apache and db4 should be fine if you already have them. Squid and squidGuard are set up specifically for our needs, so if you have them on your machine already you should remove the versions you have first. If apache is already installed, make sure your root documents are in /var/www/htdocs, the default. db4 can peacefully coexist with db1, 2 and/or 3.
    If you have none of these on your machine yet, all the better -- just download and install the following packages. important note: SQUIDGUARD MUST BE INSTALLED LAST. Install of squidGuard runs a script upon completion that finishes the configuration. Nothing will work if it is not installed LAST.


    apache-1.3.33-i486-1.tgz   1686k   MD5SUM: c450863cad0ed3771fea628d506b8caf

    db4-3.27-i486-1ABS.tgz   4397k   MD5SUM: 3c7596ead2e81ffefaa0d3003feca992

    openldap-2.2.15-i486-2pcx.tgz   2086k   MD5SUM: 48138774a002ec21edc0c306fc141a96

    squid-2.5.s9-i486-1ABS.tgz   644k   MD5SUM: 521b0c02374b5be6e098e08ba3944494

    and install squidGuard last!
    squidGuard-1.2.0.patched-i486-1ABS.tgz   3080k   MD5SUM: 69fd50738d6e063707d403f54a6efdbc

  2. Add startup calls for apache and squid to your system. Easiest way is to just plug 2 lines into /etc/rc.d/rc.local:

    /usr/sbin/apachectl start
    /etc/rc.d/rc.squid start


  3. Configure Firefox to use your new proxy.
    Relax, it's easy. I even have a screenshot :)
    Open Firefox and in the menu go to Edit -> Preferences

    In the lower-right of the page that comes up you will see Connections, click the large button marked "Connection Settings."


    Check the radio button "Manual Proxy Configuration"
    After HTTP Proxy enter "127.0.0.1"
    After Port enter "8080"
    Click OK, and you're done. Close and reopen Firefox for the settings to take effect.

    Setup of Your proxy-serving Web content filter is now Complete

    There are many additional and/or different filters you can use. See the addendum at the bottom of this page for more information.

    Next up is the Firefox BlockXXX extension.

    I got it at version 2.1, and it works quite nicely. Easy way to find it is to open Firefox and choose
    Tools->Extensions
    and in the lower-right click the link "Get More Extensions"
    Install it and configure it as follows:

    Again go to Tools->Extensions
    Highlight "BlockXXX" and click the Options button



    Check Locked
    Check Enable Scanning
    And enter a password so a user can't just turn it off.




    Click OK and restart Firefox for the changes to take effect.
    Below is a page that was NOT in the Squid database to be blocked.
    As you can see, all links and images are not displayed.



    Not quite as effective or as much fun as my "Looking for" picture . . .
    But it gets the job done fairly well.




    ADDENDUM for SquidGuard

    There are many blocking lists in addition to the "adult" database. I configured squidGuard to use the adult/domains and adult/urls lists. But the blocking lists have folders including:

    ads
    adult
    aggressive
    audio-video
    drugs
    forums
    gambling
    hacking
    mail
    proxy
    redirector
    violence
    warez

    Squid and squidGuard run very fast, but the more lists you include the more the proxy/filter will slow you down. To add lists you make changes to the squidGuard configuration file in:
    /etc/squid/squidGuard.conf
    Below is the complete file:

    dbhome /var/lib/squidGuard
    logdir /var/log/squid
    
    dest adult {
    	domainlist adult/domains
    	urllist    adult/urls
    }
    
    acl {
    	default {
    		pass !adult all
    		redirect http://localhost/blocked.html
    	}
    }
    


    To add drugs to the blocked list, first add a "dest":

    dest drugs {
        domainlist drugs/domains
        urllist    drugs/urls
    }
    

    And also put it in the "pass" line

    pass !adult !drugs all

    So the whole file would look like:
    dbhome /var/lib/squidGuard
    logdir /var/log/squid
    
    dest adult {
    	domainlist adult/domains
    	urllist    adult/urls
    }
    dest drugs {
        domainlist drugs/domains
        urllist    drugs/urls
    }
    acl {
    	default {
    		pass !adult !drugs all
    		redirect http://localhost/blocked.html
    	}
    }
    


    The only chore left is to build the database for drugs from the included files. For this log in as root and issue the following command:

    su squid -s /bin/sh -c "/usr/bin/squidGuard -c /etc/squid/squidGuard.conf -C all"

Tux Pages created and served by Linux Graphics made/edited by the Gimp   Created with the Gimp byPaul