Forum Discussion
rouanon_150376
Nimbostratus
Apr 14, 2015iRule Datagroup not equal
Dear all,
I'd like to do the following : a public address cannot access the /admin interface of a web server. Here's what I have so far :
when HTTP_REQUEST {
if { [class match [IP::remote_addr] not private_net] and [HTTP::uri] equals "/admin" } {
drop
}
}
Obviously this iRule doesn't pass the syntax check because "not" isn't accepted in this case, the bigip is waiting for either "contains" or "end_with" etc.
Now what is the best way to do this considering I need to keep my [HTTP::uri] equals "/admin" condition ?
Many thanks.
2 Replies
- kunjan
Nimbostratus
Try this:
when HTTP_REQUEST { if { (![class match [IP::remote_addr] eq private_net]) and [HTTP::uri] equals "/admin" } { drop } } - rouanon_150376
Nimbostratus
As simple as that ! Thank you kunjan.
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