Current Version: 1.0
Last Updated: March 24, 2007
Site Refreshed: April 30, 2012 (minor updates)
(Nothing to revise, DNSBL_REDIR still works and is still being downloaded!)
Working on some improvements/enhancements - new version ready, testing!
The creation of a list from your own sources is left up to you, but its simple enough to write a Perl or BASH script to take
one of the URL block lists and make it usable by RBLDNSD.
There is a small BASH script here http://www.frws.com/squid_block/down-loads/convert.squidguard
that will take a SquidGuard 'domain' list and convert it for use with this redirector. There is also an example of the 'top' of the Zone file that you have to modify and then you can use to complete the Zone file.
The script will take a 'domains' file found in the current directory, add a '.' to the beginning of each line and write that file to 'new-domains'.
The script looks like this:
#!/bin/bash
These gentlemen do a fine job, and their lists look current and work well in our environment.
To make it simple, the Zone file and block list you need can look similar to this: $SOA 86400 squidblock.yourdomain.net webmaster@yourdomain.net 1 3600 900 1209600 43200
$NS 86400 dns.yourdomain.net dns2.yourdomain.net squidblock.yourdomain.net
#
#
:2:Squid Domain Block
#
.domain-to-block.com
.another-domain-blocked.net
.yet-another-one.info
And just keep adding and removing these domains as needed.
PLEASE do not link to this error page - WRITE your own, its not tough! Use that as an
example.
Front Range Web Services donates this webspace and I wish to be a gracious user, so make your own Blocked Page! PLEASE!
NOTE: This file can be 10MB+ in size at times! Not huge - but large for a zone file! Unzip this file to access it.
VERY IMPORTANT!!!
Do not use this file as-is.
Edit the Top portion of the file to reflect your DNSBL and DNS/Domain information prior to using it!
Setting up and running this DNSBL is not hard, though setting up the DNS to use it may be tricky.
If you use BIND 9.x/8 as your main DNS server, this is how we did it:
1. Created a zone called squidblock.yourdomain.net
2. Entry as follows in the whatever-yourdomain-is SOA file:
squidblock IN A 10.0.1.1 (use a real IP here)
squidblock IN NS squidblock.yourdomain.net
3. Increment the Zone file (however your DNS server makes you do this)
4. Add the following to your named.conf file (again for BIND)
zone "squidblock.yourdomain.net" {
type forward;
forward_only;
forwarders { 10.0.0.1; }; (same IP as above)
};
5. Now reload the DNS server and watch for errors. 'rndc reload' for Bind 9 (Insert your real Domain name and working IPs as needed!)
6. At this point you should be able to have that Zone working!
This should be a simple build! READ the docs! And compile it as stated in those docs and/or the website.
There is an example startup start.squidblock script at: http://www.frws.com/squid_block/down-loads/start.squidblock
It looks like this:
#!/bin/bash
This file needs some editing also - read it carefully.
1. The IP after the -b is the IP it will bind to - change it to your server's IP
2. The -r is the directory where the RBLDNSD binary resides.
3. The -l is the log file if you want one
4. This part: 'squidblock.yourdomain.net:dnset:rbldnsd.squidblock' is your squidblock domain name, the :dnset: rule and the name of the zone file.
That is about it. Start the rbldnsd using that script and watch for errors in the /var/log/messages file and on the screen. Read the RBLDNSD instructions and see how it works!
Add the script name and path in your /etc/rc.d/rc.local file or other start-up script so it starts when your server boots once you confirm its working correctly.
License:
The dnsbl_redir is free software.
You can redistribute it and/or modify it under the terms of the GNU General Public License as published
by the Free Software Foundation.
Enjoy. (Never a guarantee it will work for you as it does for us!)