Forum Discussion
Gill_32697
Nimbostratus
Mar 11, 2016Help with iRule filter by ip subnet
Need an iRule for a vip, if client is internal 10.0.0.0 /24 then pool websure
else if the are public internet display maintenance page. this is not trggering..
when HTTP_REQUEST {
if { [IP:...
Kai_Wilke
MVP
Mar 11, 2016Hi Gill,
you may try the iRule below. It uses
[getfield] syntax to strip route domain suffixes and generates an additional log line for further troubleshooting...
when HTTP_REQUEST {
log local0.debug "Client: [IP::client_addr] Result = [IP::addr [getfield [IP::client_addr] "%" 1] equals "10.0.0.0/24"] (boolean)"
if { [IP::addr [getfield [IP::client_addr] "%" 1] equals "10.0.0.0/24"] } then {
pool websure-pool
} else {
HTTP::respond 200 content { We are sorry, Websure is currently down for essential maintenance. }
}
}
Cheers, Kai
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