Ip range in Identity gateway

Hi Experts,
I want to allow a request if its in ip range of 10.* well there is an AllowOnlyFilter in IG 7 but not in 6.5.x. how would i allow a specific range to access an API. thanks

Yeramsh,

Routes have a condition which you can set to filter out requests based on their properties.
This can be defined when the route is created. It uses the condition properties and string, or regex matching rules.
Check the documentation here for all details.

I hope it helps

1 Like

If your asking how to filter a client request based on their ip

For logic filtering (e.g. IP address range) you’ll need to implement a scriptable filter. Note that IG has to process the route traffic before making a scripted filter decision, so this isn’t precisely a firewall rule. IG will allow traffic to reach itself, process it, and then apply the scripted logic to deny or approve the request to the protected application.

Depending on your config you maybe able to get the client IP from ${request.headers[‘x-forwarded-for’]} or OpenIG doc 6.0.0 Documentation] and could see getRemoteAddress () is available to fetch the Remote Address.

For further details, see the following documents:
Setting Route Conditions
ScriptableFilter

8 posts were split to a new topic: Accessing Java Method getRemoteAddress() in Groovy for Identity Gateway"