MuleSoft · IP Allowlist policy
403 IP is rejected
Short answer
An API protected by the IP Allowlist policy returns 403 when the caller's IP address is not in the allowlist. Add the address or range to the allowlist, or fix the IP expression if the API sits behind a proxy.
VerifiedLast verified
01Error text
403 - IP is rejected02Likely causes
- The IP address the policy extracted from the request is not in the Allowlist.
- Behind a proxy or load balancer, the IP expression has to read the original client address, for example from the
x-Forwarded-Forheader.
03How to fix it
- Find the IP address the caller's requests arrive from.
- In API Manager, add it to the policy's Allowlist as a single IP (
192.168.1.1), a subnet (192.168.3.1/30) or an octet range (192.168). - If the API is behind a proxy, set IP expression to a DataWeave expression that reads the client address from the forwarded header.
- Repeat the request.
iNotes
The docs describe configuration only. The steps above apply the documented settings to the documented 403.
04Official documentation
→Related errors
- HTTP:FORBIDDENHTTP:FORBIDDEN means the server refused to return the resource because the client does not have access rights to it (HTTP 403). The credentials were sent, so fix the permissions of the identity behind them on the target system.
- VALIDATION:REJECTED_IPVALIDATION:REJECTED_IP is thrown by the Validation module's Is allowed IP and Is not denied IP operations when the IP address is not allowed by the configured list. Check the value passed to the validator, and handle the error type if invalid input is something the flow should answer cleanly.
- 401 Unauthorized or invalid client application credentialsAn API protected by the Client ID Enforcement policy returns 401 when the client application's credentials are missing, invalid or not authorized. The client needs an approved contract for the API and must send matching credentials on every request.
Test every fix in a non-production environment before you apply it to production. See how entries are verified.
More for MuleSoft work:Open MuleSoft jobsMuleSoft rates and salariesHire a senior MuleSoft developer