Rbl-add-ip

From Lundman Wiki
Revision as of 10:46, 14 June 2007 by Lundman (talk | contribs)

free real ringtones sildenafil online soma online ambien order wellbutrin order adipex propecia online free real ringtones diethylpropion online free polyphonic ringtones rivotril online free jazz ringtones but lipitor lorazepam online cheap prozac order carisoprodol polyphonic ringtones tenuate online cheap valium polyphonic ringtones lipitor online free free ringtones phentermine online free sagem ringtones free free ringtones buy ultracet ortho online buy vigrx nexium online meridia online sharp ringtones free music ringtones diazepam online carisoprodol online wellbutrin cheap meridia free ringtones xanax online free mtv ringtones fioricet online mp3 ringtones free nextel ringtones adipex online cheap xanax sagem ringtones diazepam online clonazepam online polyphonic ringtones cheap carisoprodol wellbutrin online kyocera ringtones cheap ativan order viagra lorazepam online cheap ultram kyocera ringtones alprazolam online alltel ringtones cheap ambien vicodin online free motorola ringtones free sony ericsson ringtones free punk ringtones buy viagra cheap phentermine xanax online ultram online cheap valium cingular ringtones buy adipex order cyclobenzaprine cheap propecia cheap tenuate cheap carisoprodol cheap ultracet pharmacy online online wwe ringtones cheap diazepam xenical online nokia ringtones free qwest ringtones cheap zanaflex cheap diazepam free verizon ringtones motorola ringtones order lortab prozac online ericsson ringtones but ortho cyclobenzaprine online cheap celexa free free ringtones phentermine free cool ringtones cheap prozac free qwest ringtones order cialis sprint ringtones nexium online real ringtones sagem ringtones free tracfone ringtones nokia ringtones punk ringtones mp3 ringtones sony ringtones buy ativan but hgh midi ringtones alltel ringtones flexeril online sony ericsson ringtones motorola ringtones cheap vicodin free tracfone ringtones buy soma levitra online free motorola ringtones cheap didrex cheap sildenafil pharmacy online online zoloft online cheap hydrocodone sony ringtones cingular ringtones online viagra paxil online ambien online buy lortab hydrocodone online vigrx online ativan online buy hgh sildenafil online viagra online ortho online nextel ringtones lisinopril online free funny ringtones free sony ericsson ringtones vicodin online hydrocodone cheap ativan mono ringtones online clonazepam levitra online free sprint ringtones cheap cialis free sony ringtones cheap levitra zanaflex online but phentermine order celexa ultracet online wwe ringtones sharp ringtones norco online online soma cheap ultracet free cingular ringtones cheap adipex xenical online order albuterol cheap tenuate ortho online free music ringtones sagem ringtones cheap lisinopril meridia online cheap propecia order vigrx diethylpropion online albuterol online mp3 ringtones cheap meridia free ringtones cheap ultram soma online lortab online cheap sildenafil nextel ringtones lorazepam online free funny ringtones diethylpropion online free ringtones free funny ringtones cingular ringtones cheap soma nokia ringtones clonazepam online zyban online clomid online prozac online valium order lisinopril meridia online buy tramadol free sharp ringtones free midi ringtones cheap flexeril == rbl_add_ip.pl ==

Newer version exists that fixes the Clean code. Fix me

For our RBL implementation at work, we went with a [DLZ] named, initially using the "file system" driver (proof of concept) then change to a BDBHPT driver. The latest patches are here [[1]] .

To create the BDB files, add/remove/list IP's we wrote this perl script.

 [rbl_add_ip.pl] 2006-11-02

Download the script and change the path location of your DBD's and DB environment home. To initially create your BDB files use:

 ./rbl_add_ip.pl -Z

But you do not want to run that on a live system, it will erase your BDB files.

Other uses are:

# ./rbl_add_ip 123.2.12.3
# ./rbl_add_ip -d 123.2.12.3
# ./rbl_add_ip 12.22.22.34 "550 You sent too much spam, you suck."
# ./rbl_add_ip -D 86400

The default message is:

450 You have been blocked for sending SPAM or similar.

which is a little tame, but the 450 message has saved me already. (Real servers queue the emails when some servers were added by mistake).

The whitelist file is a file of perl regular expressions on each line. For example:

^127.0.0.1$
^192.168.
.your.domain.com$

The current list of RBL codes (is this current? It was not easy to find)

       "127.0.0.2"=>"UCE",
       "127.0.0.3"=>"Fraud",
       "127.0.0.4"=>"Spam Promo",
       "127.0.0.5"=>"Illegal Content",
       "127.0.0.6"=>"Pre-emptive",
       "127.0.0.7"=>"Improper List Practices"
       "127.0.0.8"=>"Botnet Activity / Malware" 

Where rbl_add_ip.pl will use "2" unless otherwise specified.

The named.conf entry we use here, is for a Concurrant DLZ bdbhpt setup:

dlz "bdbhpt zone" { database "bdbhpt C /etc/ns DLZ.dnsdata.db"; };

Please note that "/etc/ns" and "DLZ.dnsdata.db" entries here, has to match the setting in rbl_add_ip.pl for $dbenvpath and $dbfilename.

There is currently an idea of temporary vs permanent additions. If you use the -p switch when adding an IP to RBL, it will be added permanently. The only difference is in the records TTL. However, using the -D <age> option, rbl_add_ip.pl will clean out entries that are temporary and older than <age> (in seconds). That way you can put an IP in the penalty box for, say, 24 hours. (-D 86400). If you do not use the -D option, all entries stay in the BDB until you use the -d option to delete them.

For sendmail, we add this code:

# cat rbl.m4
FEATURE(`delay_checks')
define(`DNSBL_MAP', `dns -R A -a. -r2 -d3')dnl
dnl FEATURE(dnsbl,`rbl.domain.com')dnl
FEATURE(`dnsbl', `rbl.domain.com', `$