Forum Discussion
DarkSideOfTheQ_
Nimbostratus
Sep 16, 2009Restrict access based off source network
Hello All,
Sanity check...I'm trying to block access to specific pages based off the source network the client is coming from. The rest of the site should remain available to anyone. I *think...
hoolio
Cirrostratus
Sep 17, 2009It's odd it's not working then... can you try this?
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::local_port]: Request to [HTTP::uri] with dg: $::ips_internal"
if { [HTTP::uri] contains "Test.jsp" or [HTTP::uri] contains "Stats.jsp" }{
log local0. "[IP::client_addr]:[TCP::local_port]: Matched URI check"
if {not [matchclass [IP::client_addr] equals $::ips_internal]} {
log local0. "[IP::client_addr]:[TCP::local_port]: Matched IP check. Discarding request to [HTTP::uri]"
discard
}
}
}
Aaron
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
