Overview
The Block IP feature is used to restrict access to your application by blocking requests from specific IP addresses or IP ranges. This is particularly useful for preventing access from malicious sources, limiting bot activity, or enforcing geographical restrictions.
When an incoming request matches an IP address in the IP deny list, the service will return an HTTP 403 Forbidden response, denying access to the requested resource.
Configuration Options
ipDenyList
defines the list of comma-separated IP addresses or IP ranges that should be blocked.
Supports CIDR notation (e.g.,
192.168.1.0/24
to block an entire subnet)Supports individual IP addresses (e.g.,
203.0.113.45
)Invalid IP entries will prevent the plugin from loading.
Example Scenario
Consider the following configuration:
ipDenyList: 192.168.1.1,203.0.113.45
Request Flow:
Request # |
IP Address |
Allowed? |
Reason |
---|---|---|---|
1 |
192.168.1.1 |
❌ No |
Blocked by |
2 |
192.168.1.2 |
✅ Yes |
Not listed in |
3 |
203.0.113.45 |
❌ No |
Blocked by |
4 |
203.0.113.46 |
✅ Yes |
Not listed in |
Use Cases
Security Enforcement: Prevent access from known malicious IPs.
Region-Based Restrictions: Block traffic from certain countries or ISPs.
Bot & Crawler Control: Restrict known scrapers from overloading your service.
By using Block IP, you can enhance security, reduce server load, and control access to your resources effectively.