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...
Livius
Cirrus
Jul 10, 2018This is the code I am using but not validating the client source IP addresses still:
Code
`
when HTTP_REQUEST {
log local0. "Client ([IP::client_addr]) is requesting: [HTTP::uri]"
if { ([IP::addr [IP::client_addr]/24 equals 54.179.88.0 ]) or ([IP::addr[IP::client_addr]/24 equals 17.34.134.140.0 ]) or ([IP:addr[IP::client_addr]/24 equals 219.45.252.0 ]) }
{
log local0. "Default condition"
HTTP::respond 200 content "Forbidden Redirect From Remote Server<BODY>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