Archive for the ‘Linux Tips’ Category.

How to Fix “DG version: false” Error in DansGuardian Webmin Module Error

DansGuardian is a web content filtering solution that runs on Linux and offers a lot of flexibility. DansGuardian is not free for use in commercial organizations, but is free for personal use and educational institutions. I have been working with DansGuardian for six years now, as I do happen to be employed by a K-12 school system. DansGuardian has been a perfect filtering solution for our school department. I have seen this product grow and improve in both features and in performance. While DansGuardian is easy enough to manage using the text files, the Webmin module makes it that much easier. Examining the logs is also much easier with the Webmin DansGuardian module.

After upgrading to DansGuardian to version 2.9 (I think it was) my existing Webmin module would no longer work. I searched long and hard for ways to get DansGuardian working with Webmin. Last year I did find a module located on this site momo-i.org that did work with version 2.9. Last week I loaded DansGuardian version 2.10 up on my home server and went looking for an updated DansGuardian module. I was surprised to find that one had finally been released on the original sourceforge project page that had originally provided this module. I installed the module, and tried it out. I was quite disappointed to find the error that I had seen so many times before. The version you have is not supported. Please get DansGuardian from dansguardian.org DG version: false

I checked and double checked the module config to make sure I had all of my paths set correctly. I then went back to source forge and verified that that were releasing this module for the new DansGuardian version. Next, I went digging for the line that was giving me the error. On my Fedora Core 9 machine I found the file I was looking for here: /usr/libexec/webmin/dansguardian/dansguardian-lib.pl ( /usr/libexec/webmin/dgweb/dansguardian-lib.pl if you are using the module from the momo-i.org site ) I search for the word ‘version’ and found the if condition that was causing the error. On line 53 of the SourceForge module (or line 65 of the momo-i.org module) change the line from return false; to return $1;. This line will tell the Webmin module that it is compatible with your version of DansGuardian.

After changing the line above I was able to manage the latest version of DansGuardian with both Webmin modules. While some people may have put the time in to figuring out why the module was reporting an incompatible version, I opted for the easy route. A quick Google search revealed that many people were experiencing the same issue, while others were reporting the module working with version 2.9. Having the Webmin interface for DansGuardian allows non-technical users to manage the filter. For example I have labs loaded with Ident (Auth) clients, which allows DansGuardian to identify users browsing through the filter. With a couple of mouse clicks a teacher can disable a single user’s Internet connection using the DansGuardian Webmin interface. The student is able to access all internal servers, but has no access to the Internet.

If you are looking for a content filter for your home business or school, check out DansGuardian.org. DansGuardian is loaded with customizable features that can help you filter web content.