Forum Discussion
Svevak_211593
Nimbostratus
Oct 23, 2015irule access for defined IP/client
Hello,
I want to write an iRule to allow only one defined IP and one client-group access to one defined url.
My code looks like this:
when HTTP_REQUEST {
if { ([HTTP::host] equals "cname.sport.net")}{
if { [class match [IP::client_addr] equals "datagroup-xxx"] or [class-match [IP::client_addr] equals "xxx.xxx.xxx.xxx"] }{
pool sport-http-pool
persist none
}
else {
drop
}
}
}I get this error: 01070151:3: Rule [/Common/irule-test-http] error: /Common/irule-test-http:4: error: [undefined procedure: class-match][class-match [IP::client_addr] equals "xxx.xxx.xxx.xxx"]
Can anybody help me?
2 Replies
- Svevak_211593
Nimbostratus
Think I solved it....
when HTTP_REQUEST { if { ([HTTP::host] equals "cname.sport.net")}{ if { [class match [IP::client_addr] equals "datagroup-xxx"] or [IP::addr [IP::client_addr] equals "xxx.xxx.xxx.xxx"] }{ pool sport-http-pool persist none } else { drop }} }
- Correct. :)
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