Discussion Locked

Dansguardian Perl Script

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Does anyone know how to effectively edit the dansguardian.pl 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.

4 replies

by toivo talikka

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?

by jhughery

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.

by nico baggus

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:

accessdeniedaddress='http://httpserver/cgi-bin/danguardian.pl'

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

Kind regards,
Nico Baggus

by bg4

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.

This discussion is closed to new replies.