Manual whitelist and blacklist rules are available in Security Ninja Free and Pro. Open Security Ninja → Firewall → IP Management and use Add IP rule for both list types.
Pro only on the same screen: automatic service whitelists, Test IP, viewing and lifting temporary bans, Cloud Firewall list actions, and country blocking shortcuts.
Blacklist an IP
- Go to Security Ninja → Firewall → IP Management.
- Click Add IP rule.
- Enter one IP address or CIDR range per line.
- Optionally add a Note (up to 150 characters). The same note applies to every line in that save.
- Select Blacklist.
- Click Save.
Blacklisted IPs are denied according to your firewall settings. With Pro, Prevent banned IPs from accessing the site can block the whole site. On Free, manual rules still apply to Filter Suspicious Queries and other checks that honor your lists.
Whitelist an IP
Use the same dialog and select Whitelist before saving. Whitelisted IPs keep access even when a rule would otherwise block them (for example a Pro cloud-list or country match). Traffic may still appear in logs.
If the same IP is both blacklisted and whitelisted, whitelist wins so you do not lock yourself out.
Self-ban protection
Security Ninja refuses blacklist entries that would lock you out:
- Your current visitor IP, including when the entry is a CIDR range that covers that IP
- The server IP
127.0.0.1and::1- Open ranges
0.0.0.0/0and::/0
Bulk saves skip those lines and report how many were skipped. Whitelisting your own IP is still allowed.
To allow extra IPs from code (Free and Pro), see Filter wf_sn_cf_allowlist_ips.
Ranges and wrong IPs
- Block a network: Ban subnet / IP range.
- Bans or logs show a Cloudflare edge IP: fix Visitor IP detection on Firewall → Settings first.

