Add Web Porn Filtering and Other Content Filtering to Linux Desktops

How to set up the DansGuardian content filter with the lightweight Tinyproxy.

After customizing the filters to your liking, it's important to realize that some settings become stale. Blacklisted sites and new phrases are likely to go out of date sooner than others. New Web sites you will want to block come on-line often, and new word combinations can make past phrases obsolete. Looking through the Extras link on the DansGuardian site, you will find more information on blacklists. In addition, several users have contributed scripts to automate blacklist generation and update.

As an alternative, allows new users to download their first file free. Afterwards, you can sign up for a periodic subscription for access to the latest-and-greatest information. Instructions for applying the new data for DansGuardian are on the Web site.

Another consideration is whether the proxy and filter will slow down Internet surfing and page loading. Some users will suffer a small impact on Web surfing performance when using Tinyproxy. In my own testing, I noticed a slight delay, plus a couple of issues with my browser cache. Clearing the Firefox cache with Ctrl-Shift-Del fixed the cache problems right away. Occasionally, it has been necessary to restart Tinyproxy, After doing so, my Internet performance improved. Although annoying at times, these small issues are acceptable trade-offs.

Log File Review

Both DansGuardian and Tinyproxy make log files for administrators to review. Within /var/log, you should find directories for DansGuardian and Tinyproxy. Using an editor, open the files and search through the data to find out what's been happening on the computer. Sequentially stored data and clear comment fields make the file easier to understand. For DansGuardian, there is a user-contributed add-on script for searching and displaying the results in a more user-friendly format.

One feature not found in DansGuardian is the capacity to e-mail the log files to a third party for review. This can be a real deterrent for some people if they know they have an accountability partner watching their actions on the Internet.

Some Final Thoughts

Before settling on this solution for content filtering, consider what your overall requirements are in the upcoming months. If you have only one computer to deal with and you don't mind tinkering with configuration files, DansGuardian is probably a good choice. Alternatively, SmoothGuardian looks like a great buy for $90 US. Plus, the software includes a user-friendly Web-based interface and nontechnical installation.

Nevertheless, setup of DansGuardian and Tinyproxy is well within the scope of new Linux users, and the free price fits most budgets nicely. Using this article and its references as a guide, you shouldn't have too much difficulty getting up and running. Even if you do battle a few problems, using Google to search for answers is easy. Plus, there is also a Web content filtering portal linked to the DansGuardian home page (see Resources) and an IRC chat location.

Overall, DansGuardian and Tinyproxy are frontrunners in the Open Source world and help ease the transition from the Microsoft Windows environment. I think you'll find flexible filtering and lightweight proxy overhead make this a good combination for small networking environments.

Resources for this article: /article/9291.

Donald Emmack is Managing Partner of The IntelliGents & Co. He works extensively as a writer and business consultant in North America. You can reach him at or by cruising the 2 meter amateur RF bands in the Midwest.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

what is i'm looking :)

MASOKIS's picture

wow..i din't know linux can do this.. nice:)


Anonymous's picture

I just wanted to say p-0-r-n.

I've followed the

felixvah's picture

I've followed the instruction as mention above, but I did come a cross a problem. Can someone point me to the right direction. After install danguardians tinyproxy and follow as in mention, but when I get to the point open firefox click on edit - > preference - > General tab→Connection Settings which I did not find the General Tab on my browser. did I do something wrong?

Ohh thats nice

Stalin's picture

may be if i will add this my workers won't browse to sites like and similar review sites, and start working.
i should also close the facebook access for them, it's annoying to see a log full of social network instead of work websites

I believe we have a similar

Jamie Aston's picture

I believe we have a similar situation at my workplace and works fine so far.

Just what I needed

djmadkins's picture

Excellent article, I just did this on my home ubuntu system which my 13 year old daughter uses for surfing the internet and it works like a charm.

Using the work PORN in comments.

Keith Daniels's picture

If you use the word porn in any of your comments the spam filter will reject it. If I don't keep the filter up we will get swamped by pornographic spam from spammers who noticed we were talking about porn on the site.

If you have to use porn in your comment -- use p o r n, p-o-r-n, p.o.r.n or some variant like that.


All the new OSs and windowing systems are oriented towards content consumption instead of content production.

--Steve Daniels 2013