Forum Discussion
brad9iner_11512
Altostratus
Feb 24, 2014Using 2 different Data Groups to control traffic to a Virtual Server in an iRule
I am trying to determine the best way to modify an iRule that I am using to control access to a specific Virtual Server. Currently the iRule is as follows:
when HTTP_REQUEST {
if { not [class mat...
Kevin_Stewart
Employee
Feb 24, 2014Try this:
when HTTP_REQUEST {
if { [class match [IP::addr] equals BlacklistedAddresses] } {
HTTP::respond 403 content "403 - Forbidden"
} elseif { not ( [class match [IP::client_addr] equals trustedAddresses] ) } {
HTTP::respond 403 content "403 - Forbidden"
event HTTP_REQUEST disable
}
}
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