IP Address blocking is a security measure that prevents a connection between a specific or group of IP addresses and a mail, web or Internetserver. This is usually done to ban or block any undesirable sites and hosts from entering the server or node and causing harm to a network of individual computers. IP blocking is usually used by companies and websites to prevent intrusion, block spam and protect against hacking attacks.
In this article, we will demonstrate how to block IP addresses within WordPress and also how to identify the necessary IP addresses to block.
Identifying The IP Addresses You Want To Block
There might be several instances when you will want to discover a certain IP address in order to block it. If someone is leaving spam comments on your page then you can head over to the "Comments" tab on the left-hand sidebar of WordPress Admin page. You will be able to see full details of including the IP address of any commenters.
If you find that your website is under an attack, for example, a DDOS attack, then the best way to locate the offending IP address is to head to your servers access log. You will need to login to the cPanel dashboard of your WordPress Hosting account and locate the 'Logs' section. Once there, click 'Raw Access Logs'.
You will be redirected to the access logs page where your next step is to click on your Domain Name to download the access log file.
Once you have extracted the file by clicking on it, you will be shown your access log file. The best way to view this is with a plain text editor such as Notepad.
All the raw date of requests being made to your website are logged here, with each line beginning with the IP Address making that request.
We recommend copying any suspicious IP address and using this onlineIP lookup tool before you block any IP addresses, as you wouldn't want to inadvertently block legitimate users. You want to check for IP addresses with an unusually high number of requests.
Once you have located any offending IP addresses, copy and paste them into a separate Notepad file.
Block IP Addresses In WordPress
If all you want to do is stop a specific IP address from leaving comments on your WordPress site, just head to the 'Settings > Discussion' page and scroll to the "Comment Blacklist" box. Paste any IP addresses you want to be blocked in this box and they will no longer be able to leave comments on your website.
Blocking An IP Address With cPanel
This method completely blocks an IP address from accessing or viewing your website. You should use this method when you want to protect your WordPress site from hacking attempts and DDOS attacks.
First, you need to login to cPanel dashboard of your hosting account. Now scroll down to the security section and click on the ‘IP Address Deny Manager’ icon. This will take you to the IP Address Deny Manager tool. Here you can add the IP addresses you want to block. You can add a single IP address or an IP range and then click on the add button.
You can create an email email filters through your cPanel control panel which is where you manage your hosting account. Email filters can be set up to target specific word, subject, from or to. Emails that are filtered out can be sent to a different email, deleted, delivered to a...
If you find your cPanel disk space filling up, or an email address has hit its disk space quota, cPanel has a helpful built in Email Disk Usage tool. This will provide you with a simple to understand breakdown of how much disk space each folder for a particular email...
Although WHM will normally automatically keep itself up to date, you may want to manually check for server updates / push through an update that is pending, or it may be that you have automatic updates switched off on your cPanel server. In this guide we will show you how...