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...
Aug 29, 2013
Assume data group is called allowed_ips, something like this should work:
when HTTP_REQUEST {
switch -glob [HTTP::uri] {
"/folder1*" -
"/folder2*" -
"/folder3*" {
if { not [class match [IP::client_addr] equals allowed_ips] } {
reject
}
}
}
}
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