Forum Discussion
farnsworth_7311
Nimbostratus
Dec 18, 2007Blocking a URL except from specific IP addresses
We would like to block access to a specific URL for a web application except if it is coming in from our VPN (known IP address ranges) or from our internal network. ie /admin but allow /user. How shou...
Colin_Walker_12
Dec 18, 2007Historic F5 Account
To clarify:
If a user makes a request for www.domain.com/admin, deny them unless they are on your internal network (we'll say 10.0.0.1/24).
Correct?
If so, then you'd want something like:
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/admin" } {
if {[IP::client_addr] starts_with "10.0.0" } {
pool http_pool
} else {
reject
}
}
}This is, of course, an extremely simple example. If you wanted to add a bit more intelligence/flair, you could use a network range when doing the comparison, send a custom HTTP response, etc.
HTH,
Colin
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
