Forum Discussion
JBLACKBERRY_888
Nimbostratus
Sep 18, 2023HELP CREATING IRULE FOR ACCORDING SSL VERSION RESPONSE WITH HTML PAGE
Hello,
I am trying to create / homologate a rule from a citrix balancer(netscaler) to a F5 because of a brand migration, however I have not been able to find the configuration for the rule which I ...
For all current versions, you can create an address type datagroup in the GUI under Local Traffic >> iRules >> Datagroup List tab >> Create. Select a type of 'Address' and enter the host and/or networks you want.
Optionally, in v10.1, you can add a corresponding value to the datagroup. I assume this allows you to specify an arbitrary string that the class command can return if the IP address evaluation matches. Here is a sample class as listed in the bigip.conf:
class private_net {
{
host 1.1.1.1 { "test1" }
network 2.2.2.0/24 { "test2" }
network 10.0.0.0/8
network 172.16.0.0/12
network 192.168.0.0/16
}
}
And here is a simple logging iRule which references the class:
when RULE_INIT {
log local0. "\[class match 2.2.2.2 equals private_net\]: [class match 2.2.2.2 equals private_net]"
log local0. "\[class search -value private_net equals 2.2.2.2\]: [class search -value private_net equals 2.2.2.2]"
log local0. "\[class search -value private_net equals 2.2.2.2/24\]: [class search -value private_net equals 2.2.2.2/24]"
}
And the log output:
Rule class_v10.1_rule : [class match 2.2.2.2 equals private_net]: 1
Rule class_v10.1_rule : [class search -value private_net equals 2.2.2.2]: test2
Rule class_v10.1_rule : [class search -value private_net equals 2.2.2.2/24]: test2
Aaron
- Feb 23, 2006This looks to me like a BIG-IP configuration question. We are here to support iControl (remote management API) and iRules (embedded packet processing) development work. For product related questions, you are going to have to contact F5 Product Technical Support at http://www.f5.com/customer_support
Recent Discussions
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