Livius
Jul 09, 2018Altostratus
Small 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 can add the switch clause, but for now I dont want to overcomplicate it.
Here it is:
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.140.0 ]) } { log local0. "Default condition" HTTP::respond 200 content "Forbidden Redirect From Remote ServerThis is the mock up for testing" } }
Something must be wrong, getting a syntax error.