Dansguardian Randomise Rules

If you plan to use URLBlacklist.com or Shalla rules in Dansguardian you may suffer from very slow (or impossible) restarts of the daemon. Dansguardian prefers the rules randomized rather than in alphabetical order. I couldn’t find the randomize lines package in the repos so compiled it first e.g.:

wget http://arthurdejong.org/rl/rl-0.2.7.tar.gz
tar xzf rl-0.2.7.tar.gz
cd rl-0.2.7
./configure
make
make install


Then to randomize the rules I created a small shell script (so I can automate it in future) as follows:

vi /etc/dansguardian/lists/randomize.sh

#!/bin/bash
cd /etc/dansguardian/lists/blacklists; find . -type f -exec rl ‘{}’ -o ‘{}’.tmp \; -exec mv -f ‘{}’.tmp ‘{}’ \;

Dansguardian then restarts much faster.


Related Posts

Cisco Router Emulation with G

I followed the GNS3 instructions for installation and simple topology. GNS3 can be installed from th... Learn More

Oracle Packaging Not So Eco-

This is what Oracle sent to replace a battery in a server. That little silver thing in the bag is th... Learn More

Very Cheap Wildcard SSL Certi

At $59 per year this has to be the cheapest Wildcard SSL cert ever my only deliberation is will the... Learn More

Chicken and Leek Pie with Cre

This is an adapted version of a Jamie Oliver Turkey Leek Pie and I will usually hunt the fridge for... Learn More

Solaris 11 Getting Started H

Im writing this from the perspective of a naive Linux admin so I may not be doing everything right a... Learn More

Some Linux LPI 102 Exam Quest

I just passed my Linux LPI 102 exam today and thought I would try to remember a few of the 60 questi... Learn More

No Comments

There aren't any comments yet. Be the first!