Forum Discussion
Tom_Thunem_9204
Nimbostratus
Jun 05, 2015check to see if an HTTP header IP is in a particular address space
trying to determine the iRule syntax that determines if an http::header IP is part of a certain address space. for example,
if [http::header true-client-IP] is in 172.16.38.0/24
redirect to ht...
cjunior
Nacreous
Jun 05, 2015Hi,
See this example below, but is expected to be a valid IP when header exists. Regardswhen HTTP_REQUEST {
if { [HTTP::header exists true-client-IP] } {
if { [IP::addr [HTTP::header true-client-IP] equals 172.16.38.0/24] } {
HTTP::respond 302 noserver Location "http://blah.com"
}
}
}
https://devcentral.f5.com/wiki/iRules.HTTP__respond.ashx
https://devcentral.f5.com/wiki/iRules.IP__addr.ashxHelp 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