Forum Discussion
Ryan_Rowe_79249
Nimbostratus
Sep 21, 2009Need IP restrict 9.x irule on 4.x
This is my basic 9.x rule
when CLIENT_ACCEPTED {
if {[matchclass [IP::client_addr] equals $::] || [matchclass [IP::client_addr] equals $::]}{
} else {
discard
}
}
and the datasource class contains IP's and Networks
If I could get a example of using classes in the 4.x then I think I could move forward.
This is what I have so far.
if (client_addr == one of ) {
pool
}
else {
discard
}
}
But I don't think it works.
4 Replies
- The_Bhattman
Nimbostratus
It looks like you have the same type of conditional evaluation of the IP::client_addr
Try slimming it down to the following:when CLIENT_ACCEPTED { if { [matchclass [IP::client_addr] equals $::] }{ } else { discard } }
I hope this helps
CB - Ryan_Rowe_79249
Nimbostratus
So it is going to be the same for 4.x irule? - The_Bhattman
Nimbostratus
Unfortunately I never used rules on v4.x when dealing with rules, only v9.x and up. - hoolio
Cirrostratus
You should be able to use this format where aol_class is a class of AOL IP addresses/networks.
https://support.f5.com/kb/en-us/products/big-ip_4_x/manuals/product/bigip4_6_2ref/BIGip_rules.html1183277
if (client_addr equals one of aol_class) {
use pool aol_pool
}
else {
use pool other_pool
}
Aaron
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