Forum Discussion
alexm376_3470
Mar 07, 2012Nimbostratus
iRule Error
Hi all,
need urgent help,I have the iRule below ,but it gives me errors,please advice
line 1: [command is not valid in the current scope] [class subsite {
line 5: [command is not valid in the current scope] [class Hosts {
class Ports {
50
51
500
}
class Hosts {
host 217.65.39.4
}
when CLIENT_ACCEPTED {
if { not [matchclass [IP::client_addr] equals $::Hosts]}{
forward
}
elseif { [matchclass [[UDP::client_port] or [TCP::client_port]] equals $::Ports]}{
forward
}
elseif { [matchclass [IP::client_addr] equals $::Hosts]}{
pool INTERNET_013_014
}
}
- The "class" sections look more like a bigip.conf configuration component. The "when CLASS_ACCEPTED" section is the iRule though.
Hello,
The following code is not supported in an irule :
class Ports { 50 51 500 } class Hosts { host 217.65.39.4 }
You need to define 2 data-groups (Local Traffic >> Irules >> Datagroups)
Then, in your irule, you are using a deprecated command "matchclass". Use class match instead.
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