PDA

View Full Version : How to whitelist an IP in ZBBlock software



Fli
07-06-2015, 03:42 PM
ZB Block software (http://www.spambotsecurity.com/zbblock.php) is great opensource script to prevent malicious visitors (bad bots, harvesters, hackers..) to any website.

UPDATE: zbblock may be outdated, check zbblock alternative https://cidram.github.io

After installing ZB Block, one should monitor killed_log.txt so he make sure no proper visitors are blocked.

How to whitelist an IP in ZB Block not to be forbidden 403 or blocked 503 ?

Here is the solution that worked:

1. browse killed_log.txt and find log line where is blocked IP which you want to whitelist
2. in the log message, you can see the reason for block and an code in the brackets, example: UA-139.0
3. open file customsig.inc

paste following line after line: "// *Place your custom signatures below this line."

if(inmatch($whyblockout,'(BLOCKINGCODE)','') && $ax==1 && lmatch($address,'IPTOWHITELISTHERE','')){$ax -= 1; $whyblockout .= 'Bypass for my client. (Cust-BYP-Myclient-01). ';}

i think that is universal rule to bypass some zbblock rule for single IP. One need to edit only two phrasses:
BLOCKINGCODE - in my case was : UA-139.0
IPTOWHITELISTHERE - add IP to be whitelisted

then remove IP that is being whitelisted from zbblock blocklists. I think it is this one: ippbdb.txt
i used following command in zbblock directory to find files where IP was added:
grep -Ril "IP" .

In case one want to bypass some zbblock rule entrelly for ALL IPs, not just one... copy that rule from signatures.inc file to customsig.inc and edit this part of line:
"$ax += inmatch"
to become
"$ax -= inmatch"
(in customsig.inc file)
that worked for me to bypass rule permanently

SannoHost
07-29-2015, 12:50 AM
I was just having this issue myself with my blog. Thanks for walking through it. I will have to keep this in mind next time.