Forum Discussion
Stephen_Carvill
Nimbostratus
Nov 29, 2018irule to source route a request.
I need to route an https request to a pool if the source IP matches a list but redirect to to a different place if the IP does not match. So far I have this but it just hangs.
when HTTP_REQUEST {...
Kevin_Stewart
Employee
Nov 30, 2018Your iRule syntax is correct. Are you using an address-type data group for the IPs? You also don't need a value in the data group, just the key.
You may want to add some debug logging here to see what's really happening:
when HTTP_REQUEST {
if { [class match [IP::client_addr] equals securerpm.ip.list] } {
log local0. "IP ([IP::client_addr]) matches data group"
pool securerpm.icgtax.com
} else {
log local0. "IP ([IP::client_addr]) does not match data group"
HTTP::redirect "https://scadmzprx01.lereta.com/securerpm"
}
}
Then watch from /var/log/ltm:
tail -f /var/log/ltm
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