Thursday, July 22, 2010

How to Install and setup Dan's Guardian parental control with GUI on Ubuntu 10.04

Dan's Guardian is a parental control program for Linux systems. It's difficult to set it up, but once you do, it's very powerful.

If you are googling one of these messages, you are having a difficult time installing Dans Guardian:
sudo dansguardian restart
Firefox is configured to use a proxy server that is refusing connections
Error connecting to parent proxy
For some reason squid is not working very well, and /etc/init.d/squid will give you error messages. The steps shown here works, without squid. But the step 5 had a wrong directory. I simplified stuff and added something, so I recommend you to follow the steps below

1. Open up a terminal and type these:
sudo apt-get update

sudo apt-get install dansguardian dansguardian-gui tinyproxy firehol
2. Edit: sudo gedit /etc/dansguardian/dansguardian.conf
a) Add "#" in front of UNCONFIGURED, which will comment the line out.
b) Add virusscan=off at the end of the line.
3. Edit: sudo gedit /etc/firehol/firehol.conf
Add all of the following at the start of the document:
iptables -t filter -I OUTPUT -d 127.0.0.1 -p tcp --dport 3128 -m owner ! --uid-owner dansguardian -j DROP
transparent_squid 8080 "root root"
interface any world
policy drop
protection strong
client all accept
server cups accept
4. Edit: sudo gedit /etc/default/firehol
Change "NO" to "YES":
START_FIREHOL=YES
5. Edit: sudo gedit /etc/tinyproxy.conf
Change/add the following lines (by scrolling through the document):
User root
Group root
Port 3128

I found each one of them on lines: 15, 16, 23
6. Restart each program:
sudo /etc/init.d/tinyproxy restart
sudo /etc/init.d/firehol restart
sudo /etc/init.d/dansguardian restart

If you get error messages, ignore them
7. In Firefox: Edit -> Preferences -> Advanced -> Network -> Settings
Click the "Manual proxy configuration" and type the following:
HTTP Proxy: 127.0.01 Port: 8080
and check: "Use this proxy server for all protocols"
8. Configure Dans Guardian:
System >> Administration >> Dansguardian GUI
Click on Autoconfigure/Reset Dansguardian and Tinyproxy >> Okay
Click on Lock Firefox Proxy
Click Filter setting and choose which one you'd like.
If you ever need to change preference, Dansguardian GUI is the place you need to visit back

9. (Optional) Enforce Safesearch on Google. Credit:
Edit: sudo gedit /etc/dansguardian/lists/urlregexplist
Add these lines:
"safe=off"->""
"(^http://[a-z]*\.google\.[a-z]*/[a-z]*\?)"->"\1safe=vss&"

Update: You can use Dan's Guardian on Goolge Chrome by changing the proxy setting.
Options >> Under the Hood >> Change proxy settings
* Manual proxy configuration
HTTP proxy: 127.0.01 Port:8080
Also add "127.0.0.1" on Ignored Host.
Unfortunately Chrome does not have lockdown option, so if your children are tech-savvy, avoid using Goolge Chrome with Dan's Guardian.

3 comments:

  1. I'm using Ubuntu 10.04. I have the universal repository enabled, but I'm unable to install dansguardian-gui. I receive the following error.

    E: Couldn't find package dansguardian-gui

    ReplyDelete
  2. Follow this link:http://ubuntu-virginia.ubuntuforums.org/showthread.php?t=1310351&page=3

    and add dansguardian-gui to your repository

    ReplyDelete