It is, of course, possible to deny a particular IP address access to your Joomla website.
Reasons could be:
- Someone is trying to hack your website.
- Someone is copying content from your website.
- Someone links to images or other media on your website.
- Someone attacks your website with many requests.
- Someone continuously spamming your website.
You can address this in several ways.
Blocking an IP address with Akeeba Admin Tools PRO
You can block an IP address using an extension such as the PRO version of Akeeba Admin Tools.
Using the Web Application Firewall, you can also automate things. For example, you can have a particular IP address blocked after X number of failed login attempts. (Note that you could potentially also be blocked yourself if you don't add your IP address to the Whitelist).
Blocking an IP address in the .htaccess file
You can block an IP address by adding it to the .htaccess file.
- Connect to your website via FTP
- Download the file named .htaccess
- Add the following lines to the .htaccess file:
order allow,denydeny from 12.34.567.890allow from all
If you are being attacked by multiple IP addresses, you can add as follows
order allow,denydeny from 12.34.567.890deny from 12.34.567.891allow from all
Now let's assume you are being attacked by a range of IPs, for example all IPs starting with 12.34.567, here is what you need to do:
order allow,denydeny from 12.34.567allow from all
Now the question remains: how do you know what the IPs are that are spamming you? You check your logs and see if there are repeated requests from the same IP address.
Nederlands
English 