Forum Discussion
Jason_40769
Nimbostratus
Aug 09, 2010Subwebsite ACL
We have a subsite that we would like to have an ACL for and im trying to figure out how to do it. The site would be www.mysitename.com/admin and i only want a certain host ip and network to access it. here is what i found on dev central but i get errors.
- Jason_40769
Nimbostratus
- Chris_Miller
Altostratus
when HTTP_REQUEST { if { [matchclass [string tolower [HTTP::uri]] contains $::subsite] and [matchclass [IP::client_addr] ne $::allow] } { discard } }
- Jason_40769
Nimbostratus
10.1.0 - Chris_Miller
Altostratus
Posted By Jason@musl.com on 08/09/2010 05:41 PM 10.1.0 Let's go with this then:
Let me know if you have any issues with that.when HTTP_REQUEST { if { [class match [string tolower [HTTP::uri]] contains subsite] and [class match [IP::client_addr] ne allow] } { discard } }
- Jason_40769
Nimbostratus
Still the same problem with line 1 and 5. Must not be defining something or it isn't written correctly. - Jason_40769
Nimbostratus
Also.. the most recent code you wrote returns several new errors as well. - Chris_Miller
Altostratus
Posted By Jason@musl.com on 08/09/2010 07:06 PMwhen HTTP_REQUEST { if { [class match [string tolower [HTTP::uri]] contains subsite] and ![class match [IP::client_addr] eq allow] } { discard } }
- L4L7_53191
Nimbostratus
Jason: Use the gui to add these - I replicated your issue on 10.2 but I am able to use the rule (without class definitions at the top) fine if I define the classes in the admin interface. To do this, go to iRules->Data Group List->+, then add a string type for your subsite definition for /admin (leave the value blank), then choose network for your network class. Then you should be able to start using your rule and tuning it from there. Chris is correct that we can optimize a bit, by the way. - Jason_40769
Nimbostratus
Ok if i type. - Jason_40769
Nimbostratus
Ahh, Thanks L4L7. I was missing that step. The rule works now, thank you both!!
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