Forum Discussion
gwrotterdam_347
Nimbostratus
Sep 18, 2009Data group to default pool instead of specified pool
Hi,
I've got the following code to redirect IP's who are not in the 'SysOp' datagroup to google.com
when HTTP_REQUEST {
if { [matchclass [IP::client_addr] equals $::SysOp] }{
pool pool123
} else {
HTTP::redirect http://www.google.com
}
}
This code is working fine. But is it possible to send the matching clients (clients in the SysOp datagroup) to the default specified pool in the configuration? For administrative reasons, I prefer to specify the pool in the configuration of the loadbalancer instead of in the iRule.
- hoolio
Cirrostratus
Hi,when CLIENT_ACCEPTED { Save the VIP's default pool name set default_pool [LB::server pool] } when HTTP_REQUEST { if { [matchclass [IP::client_addr] equals $::SysOp] }{ pool $default_pool } else { HTTP::redirect "http://www.google.com/" } }
- gwrotterdam_347
Nimbostratus
Aaron,
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