| |
|
|
|
|
|||||||||
|
|||||||||||||
| |||||||||||||
![]()
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.
- 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
- 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
- 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
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"
|
|
Graphics made/edited by the Gimp
|