Forum Discussion
Livius
Cirrus
Jul 09, 2018Small iRule help
Small iRule help
Hi guys,
I want to send a HTTP response based on the client source IP address, it is just for a test, but the iRule validation fails. I prefer to keep it simple, I know I c...
Lee_Sutcliffe
Nacreous
Jul 10, 2018180.10.134.140.0 is not a valid IP address. Correct this, and your iRule should work. For example:
when HTTP_REQUEST {
log local0. "Client ([IP::client_addr]) is requesting: [HTTP::uri]"
if { ([IP::addr [IP::client_addr]/24 equals 64.122.88.0 ]) or ([IP::addr [IP::client_addr]/24 equals 180.10.134.0 ]) } {
log local0. "Default condition"
HTTP::respond 200 content "This is the mock up for testing"
}
}
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