Forum Discussion
harton
Nimbostratus
Nov 04, 2013iRule for IP restrction with blocked IPs redirected to LTM webpage
Hello,
I'm currently running LTM version 10.2.4. Based on an example I found on DevCentral, I'm planning to use an irule that uses the class command to match source IPs that are defined in a data ...
Kevin_Stewart
Employee
Nov 04, 2013You'll want to use the HTTP_REQUEST event if you want to use the HTTP::respond command:
when HTTP_REQUEST {
if { not ( [class match [IP::client_addr] equals my_ip_datagroup] ) } {
HTTP::respond 200 content "html-formatted content"
}
}
You can still technically do all of this in the CLIENT_ACCEPTED event, but then you have to use TCP::respond and build a full HTTP response.
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