Forum Discussion
Ross_Merkle_791
Nimbostratus
Apr 27, 2012Irule working on current connection.
When my company rolls out new code on webservers we want the
ability to make sure everyone from the Internet is redirected to a maintenance
site. During the maintenance period I
want to ou...
John_Matlock_42
Nimbostratus
Apr 27, 2012I agree with Bryce's suggestion. Additionally, you could clean up / optimize the iRule by using a datagroup with the defined networks and use matchclass.
https://devcentral.f5.com/wiki/default.aspx/iRules/matchclass
You could create a datagroup named internal_networks_datagroup with a list of subnets/networks and use something like the following:
If pool members are down
if {[active_members [LB::server pool]] < 1} {
if { [class match [IP::client_addr] equals internal_networks_datagroup] } {
If client is internal send to internal pool
pool "[LB::server pool]_internal"
} else {
Send external connections to maintenance page
HTTP::redirect "http://www.***.com/Maint_Pages/Maintenance.html"
}
}
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
