Block Access to Your Website with a .htaccess Blocklist
The IP addresses and CIDR ranges in these blocklists are for use in Apache Web Server based websites.
Compiled by Wizcrafts Computer Services (see website links in footer)
If you are just trying to block scams and spam from your email inbox, read this section.
This information applies to people who have websites hosted by web hosting companies, using Linux/Apache based web servers, which are shared with other customers. There may be tens, or hundreds of other websites hosted on one server box and you only have control over your own domains, which are hosted on that server. Maybe you have a forum, or blog, or classified ads section that is overrun with scammers or spammers and want to keep them out. Or, perhaps your website is getting probed for vulnerabilities by other servers under the control of hackers, or your content is being "harvested" or "scraped" by competitors, or by other websites who steal your good content to use as their own. Might be you want to block an entire country from your website, or forum. In order to control who is and isn't allowed to access your web pages you can create or edit a special server file, inserting text "directives" that either allow or deny access to visitors based on their IP address.
Apache web servers use a special access control file named .htaccess, which uses a combination of plain text directives to allow or deny access to files or folders on the website, or in specific directories of that site (e.g. forums, blogs, classified ads). The .htaccess file is also used to create custom redirect rules for files, folders and entire websites that have been moved, deleted, or are temporarily or permanently gone. The proper location for your .htaccess file is in the web root. This is typically a directory named public_html, or web, depending on your hosting company. However, .htaccess files can also be placed inside sub-directories, where they only control the contents of that directory and it's sub-directories. Since it is common practice to create a sub-domain for a forum, you could place a custom .htaccess file inside the main directory for the forum, and deny access as is necessary with rules in our .htaccess blocklists.
Wizcrafts has been publishing .htaccess formatted IP blocklists (a.k.a. blacklists), for Apache-based websites, since 2005. They are used by many webmasters to deny access to spammers, scammers, scrapers, harvesters and server exploiters. Most famous of these is the Nigerian Blocklist, used by forum administrators to block Nigerian scammers from viewing or replying to ads and auctions, or registering new accounts to scam forum members.
All you require to create or modify a .htaccess file is a text editor that can save as ANSI or ASCII text, like Windows Notepad, or NoteTab Pro, or CoffeeCup HTML Editor, an FTP program or a cPanel File Manager to upload files, and the ability to see (unhide) and edit your .htaccess file, with "Mod_Access" Overrides.
The .htaccess file begins with a period, which makes it appear to have no prefix to Windows users. However, to a Unix based web server any file that begins with a period is considered a hidden system file. If you manage your website by using an FTP Client (program) to upload files it may require you to enter a special code, or check a box that allows hidden server files to be displayed. For example, WS_FTP (a very popular FTP Client) has a place to add the code -al (that is a lowercase L) in the startup configuration of sites that are added to the Site list. This code tells the server to display hidden files like .htaccess. If you are using WS_FTP open the Site Manager, create a website connection, or select an existing one (left click once), click the Edit button to open the Site Options, then click on the Startup link in Site Options. Find the input field named "Remote file mask" and type -al in it, then click OK to save the change. Now, when you log onto the website you will be able to view, edit, upload or download normally hidden files like .htaccess.
If you do not use an FTP Client to upload files, but are using a web-based control panel, it is entirely up to your web host as to whether or not you can create, view, alter, or upload .htaccess files.
Important Notice! Check your own IP address before installing any of our blocklists into your website. Your ISP may be on one of these blocklists, which means you could be denied access to your own website, if the blocklist containing your IP has been installed. Be careful when creating, editing, or pasting codes into a .htaccess file, because if you type an invalid term, directive, or character, or add an unescaped space in a regular expression, you may cause a Server 500 error to occur, locking everybody out of the website, except via FTP access (with login credentials).
Our .htaccess blocklists: Chinese Blocklist | Exploited Servers Blocklist † | Nigerian Blocklist | Russian Blocklist
The Exploited Servers .htaccess blocklist contains CIDRs belonging to dozens of popular web hosts and dedicated server companies. Your server may already be covered by this blocklist. Follow the instructions below to determine your website's ip address and corresponding CIDR, before you apply this .htaccess blocklist. You do not want to block access to your own server, with a deny rule.
There are a number of ways to determine the IP address of a web server. Any website that uses cPanel will usually display your website's ip address, in the left sidebar, when you log into your cPanel. If your web control panel doesn't show your ip address, use your PC to find it. If your computer is Windows based, or otherwise has the PING, TRACERT, or NSLOOKUP commands, either of those will show the IP address of the web server that hosts your website. Just open a Command Window and type in: ping example.com and press Enter, changing example.com to your website's domain name. Ping is a fast way to get a website's IP address, but it may fail to get it if the domain is a parked domain name. In that case you can use tracert example.com, substituting your domain name for example.com. The IP will appear at the start and finish of the trace. Nslookup, if you have it, is also a fast way to get a website's IP. In a Command window, type nslookup example.com (substitute your domain) and press Enter.
Make a note of your web server's IP, or highlight it in the command window and press Enter to copy it, then visit Domaintools.com and type, or paste that ip into the Whois Lookup search box and press enter. Look at the results to see if a CIDR range is shown that includes your server (A CIDR looks like this: 67.15.0.0/16). If a CIDR is shown in the Whois lookup, check the blocklist to see if yours is included in that list. If it is and you apply that blocklist to your website, any fully qualified URLs in your links or includes will yield a 403 Forbidden response. Either remove your CIDR before applying the blocklist, or create an "allow from" rule in your .htaccess to permit your server's IP address through (e.g. allow from 123.123.123.123), or make your links relative instead of absolute. Close this section and continue.
We can create custom blocklists for Linux/Apache based websites, based on your particular needs, at reasonable hourly rates. If you want to hire us to create a custom blocklist, or install a .htaccess blocklist on your server for you, contact us through our Webmaster Services contact form.
For Webmasters who do possess root access to the Linux operating system we publish iptables equivilants of the blocklists. Use these blocklists in your Linux APF firewalls, as iptables includes.
Here are links to our iptables blocklists:
Chinese iptables blocklist | Exploited servers iptables blocklist † | Nigerian iptables blocklist | Russian iptables blocklist
The Exploited Servers iptables blocklist contains CIDRs belonging to dozens of popular web hosts and dedicated server companies. Your server may already be covered by this blocklist. Follow the instructions below to determine your website's ip address and corresponding CIDR, before you apply this APF blocklist. You do not want to block access to your own server, with a firewall rule.
There are a number of ways to determine the IP address of a web server. Any website that uses cPanel will usually display your website's ip address, in the left sidebar, when you log into your cPanel. If your web control panel doesn't show your ip address, use your PC to find it. If your computer is Windows based, or otherwise has the PING, TRACERT, or NSLOOKUP commands, either of those will show the IP address of the web server that hosts your website. Just open a Command Window and type in: ping example.com and press Enter, changing example.com to your website's domain name. Ping is a fast way to get a website's IP address, but it may fail to get it if the domain is a parked domain name. In that case you can use tracert example.com, substituting your domain name for example.com. The IP will appear at the start and finish of the trace. Nslookup, if you have it, is also a fast way to get a website's IP. In a Command window, type nslookup example.com (substitute your domain) and press Enter.
Make a note of your web server's IP, or highlight it in the command window and press Enter to copy it, then visit Domaintools.com and type, or paste that ip into the Whois Lookup search box and press enter. Look at the results to see if a CIDR range is shown that includes your server (A CIDR looks like this: 67.15.0.0/16). If a CIDR is shown in the Whois lookup, check the blocklist to see if yours is included in that list. If it is and you apply that iptables blocklist to the server's firewall, you and your hosting customers may be blocked from accessing your own server, so remove that CIDR before applying the blocklist, or create an Allow rule in your APF firewall, to permit your server's IP address through. Close this section and proceed
If you find these blocklists useful, please Donate to Wizcrafts. Contributions from people like you, who benefit from these blocklists, will enable this work to continue. Donate via PayPal
Anti-Spam email filtering solutions for companies and end-users
If you are tired of receiving spam, viruses and Phishing schemes in your personal computer's email inbox, why not give Mailwasher Pro a try? Mailwasher Pro is a program that intercepts and analyzes incoming email before it is delivered to your Eudora, IncrediMail, Outlook (Express), Thunderbird, or equivilant email client's inbox. Mailwasher uses a combination of Bayesian Learning Filters, a user controlled Whitelist and Blacklist, user created filters and rules, including regular expressions rules, DNS Blocklists like the Spamcop SBL, and the FirstAlert! Database of known spam as identified and reported by other Mailwasher Pro users around the World, to identify and deal with spam, scams, schemes and viruses. More details about MailWasher Pro.
This blocklist is compiled and maintained by Wizcrafts Computer Services. Use it at your own risk.
No warranties are implied or stated and we are not liable for any problems that may arise from it's use.
We provide Webmaster and website security consulting services on a freelance paid basis.
This page was last updated on: Saturday, 15-Nov-2008 10:33:40 PST
If you wish to contribute new IP addresses to this list, or hire us install a custom .htaccess file for you, please contact us via our Webmaster inquiries form.