Forum Discussion
parvez_70211
Nimbostratus
Apr 10, 2017Using X-Forwarded-for to block Clients based on URI information
I have task to block client IP's based on URI information but the catch here is that the actual IP's are present on HTTP header (X-forwarded-For) which are all coming from Akamai.
Eg: I have approx...
rsacheen_310098
Nimbostratus
Apr 10, 2017How do you like to modify your iRule? The code snippet you have provided looks fine syntax wise, but it blocks access from IP's in your AllowList. How about something like this:-
when HTTP_REQUEST {
if { [HTTP::uri] equals "/en_US/HHCM" && !([IP::addr [IP::client_addr] equals AllowList]) } {
log output
reject
} else {
Send traffic to your desired server pool
}
}
Just an example. Correct me if I misunderstood your query.
Connection from client IP's [IP::client_addr] that are not in your data group(AllowList) gets blocked.
parvez_70211
Nimbostratus
Apr 10, 2017Connection from client IP's that are not in your data group(AllowList) gets blocked. - correct
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
