Forum Discussion
DaveC_53879
Nimbostratus
Nov 18, 2011Restrict access by IP
I have an irule that I want to use to only allow certain IP addresses. I think what I have should work but it blocks all addresses to the specific URI. I'm running ver. 9.4.6
when HTTP_REQUEST {
if { ([HTTP::uri] starts_with "/protect") and ! ([matchclass [IP::remote_addr] equals $$My_Internal]) } {
HTTP::close
}
}
My_Internal equlas my IP addresses. Even if I put an IP in directly, 10.0.0.2, it blocks everything.
What am I missing here? I see lots of similar posts and I think this should work. Thanks in advance.
11 Replies
- Parinya_Ekparin
Nimbostratus
Thanks a lot for an example and advice.
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
