If you’re asking *can you blacklist IPs from accessing your API*, the answer is yes, but it’s not always the best fix.
Some attackers use proxies or VPNs, so blocking one IP might not stop them.
Instead, try rate limiting (like in Nginx or Cloudflare) to slow down abuse. Or use a service like AWS WAF if you’re on AWS—it’s got IP blacklisting + other protections.
Here’s a Cloudflare rule to block IPs:
1. Go to Firewall > Tools > IP Access Rules
2. Add the IP and choose "Block"
Easy peasy.
Some attackers use proxies or VPNs, so blocking one IP might not stop them.
Instead, try rate limiting (like in Nginx or Cloudflare) to slow down abuse. Or use a service like AWS WAF if you’re on AWS—it’s got IP blacklisting + other protections.
Here’s a Cloudflare rule to block IPs:
1. Go to Firewall > Tools > IP Access Rules
2. Add the IP and choose "Block"
Easy peasy.
