Forum Discussion
sstafford
Nimbostratus
Apr 03, 2009IRule to block all but a few members of a subnet
For give the newbie question, but this will be all of the second iRule that I've ever had to write. We've got a situation where a major application has failed, and we're moving it behind the LTM. Ho...
dennypayne
Employee
Apr 03, 2009Since it's temporary, you could just use packet filters rather than writing a rule.
Or, something like:
when CLIENT_ACCEPTED {
if { not (IP::addr[IP::client_addr] equals "x.x.x.x") } {
add add'l IP's with an || operator if needed
discard
}
}
or if you create a Data Group (class) with your list of IP's:
when CLIENT_ACCEPTED {
if { not ( [matchclass $::data_group_name contains IP::addr[IP::client_addr]]) } {
discard
}
}
Denny
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