
Browsing Safely:
“No thanks, I don’t like eggs.”
DansGuardian is web-content-control software that was originally written by Daniel Barron, and its slogan on the website is “true web content filtering for all.” “All what?” you ask. Well, if you’re not careful, then you could end up filtering ALL of your web content.
Setting up DansGuardian is not exactly a click-through process. In order to set up a web-content-filtering server, you will need a certain amount of experience that I don’t have. However, if you are simply interested in adding an extra layer of protection to your personal browsing habits on one machine, then read on.
Step 1 – The Silver Bullet (If you’re not serious about DansGuardian, then stop now)
WARNING: By completing this step correctly, you will have effectively shot down pretty much any harmful web content from entering your browser. Overkill? Probably. By default, you are unable to download most filetypes, and you will not have access to websites containing content related to “hacking” or “proxies,” including this one! So, copy this tutorial if necessary to an offline source. We will fix this “bug” later.
Bodhizazen has a good tutorial that will get you through the bulk of the setup.
Follow it verbatim, and pay specail attention to step 5 “Obviously change to “bodhi” to your log in name, and add additional users if needed, one per line, before you add the last “DROP” line.”
Step 2 – Acupuncture (Allowing some important content to flow in)
Your DansGuardian configuration files will be stored in a set of “lists” that are located in:
/etc/dansguardian/lists/
Open “terminal” and cd to the directory:
cd /etc/dansguardian/lists/
Type
ls
to list the contents of the directory.
Here is the general workflow:
-Edit the appropriate list
gksudo gedit listnamehere
(Replace listnamehere with the name of the list in that directory)
-You will be prompted for your password and then you can edit the list in gedit.
-Comment out parts of the list by placing a “#” infront of that line
-Save and close
-Restart DansGuardian*
NOTEABLE LISTS
a) Access content: Proxies and tutorials like this one
gksudo gedit weightedphraselist
Place a “#” before the line that says: .Include</etc/dansguardian/lists/phraselists/proxies/weighted>
b) Be able to download files: mp3, rar, …
gksudo gedit bannedextensionlist
Place a “#” before every filetype you want to be able to download
c) Access unusual sites e.g. youtube
gksudo gedit exceptionurllist
Go to the bottom of the list and type (one per line) the url of the known safe sites that you want to display properly e.g.:
youtube.com
If you find a snag in your browsing, then come back to this directory and continue to fine-tune the lists. You can also add things to the banned lists to filter whatever you don’t like (e.g. “eggs”).
*Once you have edited the lists, you must restart DansGuardian
sudo service dansguardian restart
STEP 3 – Physiotherapy: Getting the larger parts working properly
Some of the essential or larger applications will stop functioning correctly. Below are a few that I came across, and fixed with the following solutions.
a) First, setup the system proxy on your computer: type “proxy” in the dash search, and click on the “Network” icon. Go to “Network Proxy”. Fill in HTTP and HTTPS with “localhost” and “8118″. Leave FTP and SOCKS blank! (see image)

The reason why I say use “8118″ instead of “8080″ is because you are less likely to find harmful content outside of your browser (proxy set to 8080), and this will allow more flexibility. This will also help you switch between 8118 and 8080 in your browser should you need to. You can select “use system proxy” instead of manual.***
b) UBUNTU ONE – won’t sync!
Due to a bug, Ubuntu One will not work by default behind a proxy.
- Complete step (a)
- Install this:
sudo apt-get install ubuntuone-client-proxy
-REBOOT
c) THUNDERBIRD – won’t display images!
- Complete step (a)
d) TOR BROWSER BUNDLE – won’t start!
- Change network proxy settings in vidalia (see image):

e)cPanel – token cookie session what?!
[EDIT] One way is to edit your privoxy user settings
gksudo gedit /etc/privoxy/user.action
And add this to the bottom of the text file.
{ -block }
urlofyourCpanelsite.com
This will UNblock your site from privoxy. Now restart privoxy
sudo service privoxy restart
I haven’t sorted this out completely. It’s actually a privoxy issue and not dansguardian
-As an OK workaround, click the like that says “If you need an interface that uses less JavaScript click here.”

Reflection
***This is not a perfect solution, as the main user can turn harmful content on/off as it pleases, but at least it’s one more step. Take a rest. You are on your road to recovery.