Forum Discussion
N_67263
Nimbostratus
Oct 06, 2014iRule heelp needed to allow only specific IP addresses.
Folks,
I am looking for an iRule which allow particular source IP only if a particular URI is in the http request.
If this URI is not in the request it should allow all IP's.
e.g. http://nik.te...
ab30_149107
Nimbostratus
Oct 06, 2014Dear Nikhil,
Try this, I have corrected the syntax errors.
when HTTP_REQUEST { if { ([HTTP::uri] ends_with "/support/test.html") and ( [IP::addr [IP::client_addr] equals 1.1.1.1] ) } { HTTP::redirect "http://[HTTP::host]/support/test.html" } elseif { ([HTTP::uri] ends_with "/support/test.html") } { reject } else { pool test_pool } }
Thank You, Abhisar.
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