Forum Discussion
Raymond_Feng_97
May 12, 2006Historic F5 Account
how to use matchclass work with network group
Hi, all
very easy question ,but I tried serveral times ,still not found the answer. The question is how to write the irules like below which is irule4.5 .
if( client_ip == one of hacker_class) {
discard
}
else {
use pool server_Pool
}
class hackerIP {
host 202.1.1.1
;host 202.1.1.2
;host 202.1.1.3
;network 202.1.1.0 mask 255.255.255.0
.
.
}
sorry, I don't know how to use matchclass work with [ip::remote]?
does anybody can help me to re-write this irules into irulev9?
- hoolio
Cirrostratus
Hi Roy,class my_hosts_networks_class { network 10.0.0.0 mask 255.0.0.0 host 192.168.0.100 } rule reject_rule { when CLIENT_ACCEPTED { if { [matchclass $::my_hosts_networks_class equals ::my_hosts_networks_class ] } { reject } default action is to return to VIP's configuration for handling traffic that doesn't match this rule } }
- Raymond_Feng_97Historic F5 Accounthaha, it takes me one hour to combat with if-else state!!!!! I don't know why, but it's true , blew irules can run:
- Al_Carandang_11
Nimbostratus
Yes - in TCL commands do not continue beyond the end of a line with the following exceptions:
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