creating script for URIBL.com (and others)

8 posts / 0 new
Last post
itefix
Offline
Last seen: 2 weeks 10 hours ago
Joined: 01.05.2008 - 21:33
creating script for URIBL.com (and others)

Hi! First, let me say that I'm thrilled that you've created this. I've been looking for this very thing for MONTHS!
THANK YOU SO MUCH!!!

I don't have the resources to pay to SpamHaus access yet... but I'm hoping to adopt this to other DNS-based lists which provide rbldnsd access.

In particular, I'm having trouble created a script for the feed from www.URIBL.com

They sent me THIS sample script:

http://www.powerviewsystems.com/uribl.txt

(I reference it in this way because I don't know if this is suppose to be available to the public. Therefore, by referencing it this way, I can delete this from my server in a couple of days and not get into trouble for posting it in a public forum. Therefore, if needed, be sure to copy the contents of that file for future reference because it won't be available for long.)

Anyways... I spent a couple of hours trying to adopt that script's elements to your program to try to create a new uribl script... but I keep hitting "brick walls".. probably due to my lack of experience in this programming environment.

Any chance you could help me with this?

Thanks!

Rob McEwen
PowerView Systems

itefix
Offline
Last seen: 2 weeks 10 hours ago
Joined: 01.05.2008 - 21:33
Re: creating script for URIBL.com (and others)

I tried to simplify your script in a generalized form, so that it can be used in a wrbldnsd environment. I assume that wrbldnsd runs
with your zones defined and your dns environment is set up
correctly.


#!/bin/bash
RUNFILE="/tmp/uribl"
IOTIMEOUT=60
SERVER="xxxxxxxxxxx"
REMOTE_PATH="xxxxxxxxxxxxx"
ZONESDIR="/rbldnsd/"
RSYNC_BINARY="/bin/rsync"
echo "Ok, Checking for run file"
if ; then
echo "$RUNFILE exists, rsync running?"
exit 100;
else
touch $RUNFILE
fi
echo "Start Sync"
$RSYNC_BINARY -T /tmp -trlv --timeout=$IOTIMEOUT $SERVER::$REMOTE_PATH $ZONESDIR
echo "Cleanup"
if ; then
rm -f $RUNFILE
fi

itefix
Offline
Last seen: 2 weeks 10 hours ago
Joined: 01.05.2008 - 21:33
Re: creating script for URIBL.com (and others)

Thanks for your help.
I tried to get this to work... but I get the following error message:

@ERROR: access denied to zones from powerviewsystems.com (204.9.77.38)
rsync error: error starting client-server protocol (code 5) at main.c(1171)

Now I'm wondering, is this a problem with me possibly not having proper permission with URIBL (yet)? Or is this problem with my configuration of wrbldnsd?

Also, in "rbldnsd-stderr.log" log, I'm getting the following error:

"rbldnsd: unable to bind to 127.0.0.1/53: Address already in use"

I don't recall using this port for anything else. One guess is that in the process of trying to troubleshoot this, I did a few uninstall and re-installs and maybe this botched up port 53? Perhaps I should reboot?

Also, I'm using TreeWalk caching DNS server and I understand how I need to reference wrbldnsd by making the proper changes in the named.config file once I'm done getting wrbldnsd working properly... but what I don't understand is... is there some other type of config files in the wrbldnsd directory (or elsewhere?) that need to be set up (kind of like the equivalent of zone files in BIND)??

Thanks again for all of your help! (sorry if I'm being a pest!)

Rob McEwen

itefix
Offline
Last seen: 2 weeks 10 hours ago
Joined: 01.05.2008 - 21:33
Re: creating script for URIBL.com (and others)

@ERROR: access denied to zones from powerviewsystems.com (204.9.77.38)

It seems that you don't have proper permissions.

Also, in "rbldnsd-stderr.log" log, I'm getting the following error:

"rbldnsd: unable to bind to 127.0.0.1/53: Address already in use"

If you're sure about that there are no other programs occupying port 53, it must then be related to multiple instances of wrbldnsd. Make sure that you have only one installation.

Also, I'm using TreeWalk caching DNS server and I understand how I need to reference wrbldnsd by making the proper changes in the named.config file once I'm done getting wrbldnsd working properly... but what I don't understand is... is there some other type of config files in the wrbldnsd directory (or elsewhere?) that need to be set up (kind of like the equivalent of zone files in BIND)??

No configuration files. All rbldnsd options are specified as command line arguments.

itefix
Offline
Last seen: 2 weeks 10 hours ago
Joined: 01.05.2008 - 21:33
Re: creating script for URIBL.com (and others)

Turns out, just as you said... it WAS a permissions issue. But I just received the proper permissions from URIBL and it WORKED!
Now, regarding the "port in use" error, can I use an alternative port? If so, what are the steps to change over to a different port?

Thanks for your wonderful help!

Rob McEwen

itefix
Offline
Last seen: 2 weeks 10 hours ago
Joined: 01.05.2008 - 21:33
Re: creating script for URIBL.com (and others)

MAJOR PORT CONFLICT...
it turns out that not only does treewalk use Port 53, I'm pretty sure that BIND9 (in general) uses Port 53. I'm currently trying to find out if TreeWalk can use a different port... (but I fear that setting TreeWalk to a different port might be like asking a web server to not server web sites on port 80.)

I saw some references on some other sites saying to change the rbldnsd port to something different than 53 if used on a system which is also running BIND9.

Any suggestions?

Thanks!

Rob McEwen

itefix
Offline
Last seen: 2 weeks 10 hours ago
Joined: 01.05.2008 - 21:33
Re: creating script for URIBL.com (and others)

Me again :)
(am I driving you crazy yet?)

Is there a way to specify rsync to use a **particular** IP address chosen from the range of IPs on my server.

Basically, I want to use this for SURBL as well... but they insist on only allowing access from a single IP address. But I sometimes have to switch the "default" IP of my server and this wouldn't work well if outgoing requests are seen by SURBL as coming from any IPs other than the **one** that they give me permission on.

Thanks again!

Rob McEwen

itefix
Offline
Last seen: 2 weeks 10 hours ago
Joined: 01.05.2008 - 21:33
Re: creating script for URIBL.com (and others)

OK... I think I figured out much of this... for some of this, i'll have to put my "dunce cap" on... some of this was so simple and obvious, I shouldn't have had to ask.
For now, just ignore all my posts and I'll follow up later with any follow-up questions for the not-so-obvious stuff.

Thanks!

Rob McEwen

Topic locked

Release announcements