Forum Discussion
Ranvir_Floura_7
Nimbostratus
Mar 02, 2007Redirect based on source IP address
Hello,
I have a iRule question on version 4.6.2 of Big-IP. What I am trying to set up is during maintenance windows, allow only a specific IP (or a group of IP address) to be able to connect to the production application, everyone else will get redirected to a static page saying something along the lines of "maintenance going on - come back later".
Will the following rule work?
rule myweb {if(client_addr == 192.168.10.10)
{redirect to "http://limited.mywebapp.com"}
else {use pool servers}
}
rule limited_myweb
{if(client_addr!= 192.168.10.10)
{redirect to "http://www.mywebapp.maintenance.com/"}
else {discard}
}
Thanks!
- Martin_MachacekHistoric F5 AccountRanvir,
pool www_servers { fallback "http://www.mywebapp.maintenance.com" member 1.1.1.1:80 member 1.1.1.2:80 } pool servers { member 1.1.1.1:* member 1.1.1.2:* } rule myweb { if(client_addr == 192.168.10.10) { use pool servers } else { use pool www_servers } } virtual www.mywebapp.com:80 { use rule myweb }
bigpipe node 1.1.1.1:80 1.1.1.2:80 disable
- Ranvir_Floura_7
Nimbostratus
Thanks mmac! That worked out just fine.
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