Forum Discussion
stetson_308325
Nimbostratus
Feb 16, 2017iRule to Allow certain IP Addresses through, otherwise give maintenance content
I need to make an iRule that can allow through a couple of ip addresses to a virtual server. Otherwise, I would like to display a maintenance page. Here is what I have so far, I'm very new and I know the syntax and form isn't correct but this might be the right track:
when HTTP_REQUEST { if {( [IP::addr [IP::client_addr] equals 1.1.1.1] )} {pool Our-HTTP-Pool}
HTTP::respond 200 content \
"Maintenance page
All your servers are belong to us" "Content-Type" "text/html"
return
}
1 Reply
- ekaleido
Cirrus
when HTTP_REQUEST { if {( [IP::addr [IP::client_addr] equals 1.1.1.1] )} { pool Our-HTTP-Pool } else { HTTP::respond 200 content \ "Maintenance page All your servers are belong to us" "Content-Type" "text/html" return } }
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
