Forum Discussion
Kevhed
Nimbostratus
Jun 05, 2017irule allowing access from multiple subnets
Hi group,
I'm using the below irule to block access to a file called "sales_new" for everyone except if you're coming from the 10.0.0.0/8. This irule is working perfectly. But now I need to ad...
dragonflymr
Cirrostratus
Jun 05, 2017Hi,
Just change it to, probably not the best code around but should work:
when HTTP_REQUEST {
log local0. "Client IP: [IP::client_addr]"
log local0. "URI: [HTTP::uri]"
if { ([HTTP::uri] contains "/Sales_New" ) and not ( [IP::addr "10.0.0.0 mask 255.0.0.0" equals [IP::client_addr]] or [IP::addr "172.16.0.0 mask 255.240.0.0" equals [IP::client_addr]]) } {
log local0. "dropped"
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