subject: Total Control of E-mail SPAM | Inbox SPAM Help! [print this page] BLOCKING the problem is based around a very good E-mail Spam Program which blocks IP addresses and uses many scripts
(a very small part of its power) to block e-mail SPAMMERS. It works extremely well, is more efficient than an extensive list
of Spam Blocking programs I have tried (several dozen) including many claiming to be top rated.
My approach to finding how to sort out the puzzle:
How do I block IP addresses? A whole country? How to Block Spam Servers?
CIDR Ranges - Classless Inter-Domain Routing
CIDR/Netmask Example:
199.64.0.0/10
This says the base address of the network is 192.64.0.0 and the first 10 bits are the network:
199 64 0 0 = 11000000 01000000 00000000 00000000
199 is the first 8 bits, but two more bits are part of the network ID, too. The 9th bit is 0 and the 10th is 1, and that is where the 64 comes from.
My email program allows me to enter IP scripts (among countless others) which you can also use in .htaccess.
Example1:
to block a range of IP's: 199.0.0.0-199.255.255.255 (blocks all inclusive)
OR can shorten to: 199.0.0.0/24 or 199.0.0/24 (after the slash could be /8,10,16,17,18,24,27 info links will explain deeper)
(Source:my own spammer IP)
Example2: (one more spammer)
98.0.0.0-98.0.0.255 which means all IP numbers between 98.0.0.0 and 98.0.0.255 inclusive.
A shorter way to do it. Like this: 98.0.0.0/24 or even 98.0.0/24
Example3: (one of my spammers)
of code added to main .htaccess
deny from 62.0.0.0/8
This would mean we are blocking ip address from:
62.0.0.0 thru 62.255.255.255
deny from 80.0.0.0/4
This would mean we are blocking ip address from:
80.0.0.0 thru 95.255.255.255
Example4:
"10.10.1.32" is binary "00001010.00001010.00000001.00100000", so 10.10.1.32/27 will match the first 27 digits
("00001010.00001010.00000001.00100000"). The IP addresses 10.10.1.3210.10.1.63, when converted to binary, all have the same 27 first
digits and will be blocked if 10.10.1.32/27 is blocked.