Showing posts with label parental control. Show all posts
Showing posts with label parental control. Show all posts

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.

Why Dan's Guardian is so good

I am not a parent, but I am very much into parental control. I don't want to see any porn on my computer. Period. It's a distraction and I want to become a good father and husband one day, so I am training myself by abstaining. (And to not sin)

I used OpenDNS on my Linux machine but it was not enough. Google search did not enforce Safe Search, allowing racy and naughty pictures on my screen. It was a naughty no-no.
That's where Dan's guardian came to rescue. If you follow my instruction, you will be able to enforce VerySafeSearch on you ubuntu machine. Also OpenDNS does not have an extensive blacklist, just domain blacklist, but Dan's Guardian has everything. It can effectively select and ban: IPs, Sites, URLs, Phrases, MIME Types, and File Extensions. Only feature it lacks is the scheduled blocking, but I am fine without it.

FYI, I use K9 Web protection and OpenDNS on my Windows machine.