iRules how to make the http_request seeping ip

Problem this snippet solves:

I want to filter IP traffic and depends ip redirect me to certain pages . believes this code does not work.

I hope and I can help will thank .

Code :

when HTTP_REQUEST {
if { [IP::client_addr] equals "192.168.1.1" && "192.168.2.1" && "192.168.2.1" && "192.168.9.1" && [HTTP::uri] ends_with "/"
}
{
pool Pool_App_Server
}
else
{
drop
}
}

Tested this on version:

11.6
Published Jun 27, 2016
Version 1.0

Was this article helpful?

3 Comments

  • Can you please post this to the https://devcentral.f5.com/s/questions section? Codeshare is for sharing complete working or helpful code, not code-related questions. Cheers!
  • No problem. You'll get quicker and better responses in the Answers section. Just want to make sure you're taken care of!.