General discussion


Dansguardian Perl Script

By jhughery ·
Does anyone know how to effectively edit the script that comes with dansguardian which is a url filtering software. I have changed the script with BlueFish and saved them but nothing seems to show up, if I go to a blocked website that I've configured, my changes don't show up in the page. I have also restarted the dansguardian service every time I made changes to the perl script.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

by Toivo Talikka In reply to Dansguardian Perl Script

I think blocking a website happens by adding it to the file /etc/dansguardian/bannedsitelist, and if you want to block part of a site, you add it to bannedurllist.

Those files are just text files, and the simplest way to edit them is to use vi or vim.

Does your Dansguardian go through a proxy like Squid?

Collapse -

by jhughery In reply to Dansguardian Perl Script

Yes, I use squid for filtering my websites through dansguardian but that's not the problem I'm trying to fix, I'm trying edit the dansguardian perl script, this is the script of the web page that comes up when someone tries to access a blocked website.

Collapse -

by Nico Baggus In reply to Dansguardian Perl Script

Did you also setup a private http server
(apache?, or something different..., can be
anything just as it serves the cgi-script by
running it).

In your dansguardian.conf you need to configure
this page as:


you httpserver address need to be filled in at
the above url.

Kind regards,
Nico Baggus

Collapse -

by bg4 In reply to Dansguardian Perl Script

Rather than editing the perl script, you can change the html template file. You will find it under the language directories. (mine is "/usr/local/share/dansguardian/languages/ukenglish"). The file is called "template.html" and the file is well commented. It lists all the variables that are available. Note, the perl script html will only be output if the template.html file does not exist.

Hope this helps.

Related Discussions

Related Forums