Author Topic: Tutorial - Installing DansGuardian Web Content Filtering in Peppermint 3  (Read 3873 times)

0 Members and 1 Guest are viewing this topic.

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 13594
  • Karma: 339
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
What is DansGuardian Web Content Filtering ?

Quote from: DansGuardian Website
DansGuardian is an award winning Open Source web content filter which currently runs on Linux, FreeBSD, OpenBSD, NetBSD, Mac OS X, HP-UX, and Solaris. It filters the actual content of pages based on many methods including phrase matching, PICS filtering and URL filtering. It does not purely filter based on a banned list of sites like lesser totally commercial filters.

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.

http://dansguardian.org/



OK, how to install/configure DansGuardian in Peppermint 3

First you need to install the dansguardian and squid packages .. so open a terminal and run:
Code: [Select]
sudo apt-get install dansguardian squid
(don't worry if you see a warning about dansguardian not being configured .. just carry on below)

Now you need to edit the dansguardian.conf file .. so back in the terminal run:
Code: [Select]
sudo gedit /etc/dansguardian/dansguardian.conf

When the file opens, look for the line that reads:-
Code: [Select]
UNCONFIGURED - Please remove this line after configuration

and comment it out, so it now reads:-
Code: [Select]
# UNCONFIGURED - Please remove this line after configuration

SAVE the file and exit gedit.

Now you need to edit squid.conf .. so back in the terminal run:
Code: [Select]
sudo gedit /etc/squid3/squid.conf

Find the section that reads:-
Code: [Select]
# Squid normally listens to port 3128
http_port 3128

and add the word "transparent", so it now reads:-
Code: [Select]
# Squid normally listens to port 3128
http_port 3128 transparent

SAVE the file, and exit gedit.

Now just in case you got the error I mentioned earlier, you're going to reinstall dansguardian and squid (this will then pick up the edited configs, and restart dansguardian) .. so back in the terminal run:
Code: [Select]
sudo apt-get install --reinstall dansguardian squid

OK, now you need to add some system-wide environment variables .. so back in the terminal run:
Code: [Select]
sudo gedit /etc/environment

A file should open (that probably contains a single line that starts with PATH=)

Add the following lines BELOW what's already there (DO NOT remove what's already there):-
Code: [Select]
http_proxy=127.0.0.1:8080/
https_proxy=127.0.0.1:8080/
ftp_proxy=127.0.0.1:8080/
no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
HTTP_PROXY=127.0.0.1:8080/
HTTPS_PROXY=127.0.0.1:8080/
FTP_PROXY=127.0.0.1:8080/
NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com"

SAVE the file, and exit gedit.

REBOOT.

Now fire up the Chromium web browser and try to access a websitet you wouldn't want your kids to access.



If you use the Firefox web browser .. you'll also need to fire up Firefox, and go to:-

Edit>Preferences>Advanced>Network>Connection Settings (button)

And manually change the proxy settings to:-

HTTP proxy: 127.0.0.1     Port: 8080

and tick the "Use this proxy server for all protocols" box (as in the picture below).

Then click the "OK" button

« Last Edit: April 01, 2013, 06:58:57 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline velda

  • Jr. Member
  • **
  • Posts: 1
  • Karma: 0
  • I've just joined!
    • View Profile
    • Awards
Re: Tutorial - Installing DansGuardian Web Content Filtering in Peppermint 3
« Reply #1 on: December 10, 2013, 09:30:51 am »
Nice Tutorial.
I have DG up and running, no problem.
BUT
I need to form groups of users, per their IP address, and allow them Internet access, while blocking for example social_networking for IP1, but allowing it for IP2.
Any ideas how to do this?
My DG is 2.12.0.0, and I have CentOS 6U4.

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal