---
title: How to blacklist an IP
canonical: https://wpsecurityninja.com/docs/firewall/how-to-blacklist-an-ip/
---
## How to Manually Blacklist an IP Address with WP Security Ninja

WP Security Ninja lets you manually block specific IP addresses from the Firewall tab. IP rules use one **Add IP rule** dialog for both blacklist and whitelist entries.

### Steps to Blacklist an IP

1. Go to **Security Ninja → Firewall → IP Management**.
2. Click **Add IP rule**.
3. Enter one IP address or CIDR range per line.
4. Optionally add a **Note** (label for the rule).
5. Select the **Blacklist** radio button.
6. Click **Save**.

![Add IP rule dialog with Blacklist selected](https://wpsecurityninja.com/media/2026/08/firewall/blacklist-ip-field.png)

Any IP you save as Blacklist is denied access according to your firewall settings.

### Important Note

If you accidentally enter your own IP address as both blacklist and whitelist, the whitelist takes precedence so you do not lock yourself out.

### Blocking IP Ranges

You can also [block a range of IPs by entering a subnet mask](https://wpsecurityninja.com/docs/firewall/ban-subnet-mask/).

### Whitelisting IPs

To allow an IP instead, use the same **Add IP rule** dialog and select the **Whitelist** radio button before saving. Whitelisted IPs keep access even when the firewall is active; their traffic may still be monitored.

![Add IP rule dialog with Whitelist selected](https://wpsecurityninja.com/media/2026/08/firewall/whitelist-ip-field.png)

### Related Resources

*   [How to block a range of IPs](https://wpsecurityninja.com/docs/firewall/ban-subnet-mask/)
*   [How to block a country](https://wpsecurityninja.com/docs/firewall/how-to-block-a-country/)
*   [How to access your website via FTP](https://wpsecurityninja.com/docs/installation-and-usage/how-to-access-your-website-via-ftp/)
