Forum Discussion
zblue_123071
Altocumulus
Aug 21, 2013iRule to Allow Certain Client IP
Hi, I have a situation where I need to permit certain IPs to access HTTP content, to do this, I have an iRule that is using a switch based off of the client IP like this: when HTTP_REQUEST {...
zblue_123071
Altocumulus
Aug 21, 2013Okay, here is what I ended up doing:
when HTTP_REQUEST {
switch [HTTP::host] {
"my.site.com" {
if { [class match [IP::remote_addr] equals MYDATAGROUP] } {
pool MYPOOL
} else {
HTTP::respond 200 content [ifile get AccessDenied]
}
}
}
}
Thanks again for the suggestions!
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