Forum Discussion
Kevin_Nail
Nimbostratus
Aug 29, 2013How do I only allow access to certain folders from a few IPs but not others
I can create an data group for the approved IP list but how do I take that list and use it to allow access to folders. for example:
IP 1.2.3.4 can access
mysite.com/folder1
mysite.com/folde...
Kevin_Nail
Nimbostratus
Aug 30, 2013Thanks everyone!
I got it working by creating 2 data groups and an iRule (borrowed from some others)
when HTTP_REQUEST { if {([class match [string tolower [HTTP::path]] starts_with allowed_uriList]) and not ([class match [IP::client_addr] equals ips_allow])}{
log local0. "Untrusted IP ([IP::client_addr]) attempting to access secure path ([HTTP::uri])"
discard } else {
log local0. "Allowing connection from [IP::client_addr] to [HTTP::uri]"
} }
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