Forum Discussion
Andrés_Ortiz_10
Nimbostratus
Jun 21, 2007LDAP traffic
Hi,
I try to address my LDAP traffic according to it belongs to a IP range or another.
I think that I can do this by this way but
I don't know how to describe and compare range ...
Deb_Allen_18
Jun 21, 2007Historic F5 Account
To perform comparison of client IP address with a list of addresses or subnets in a Data Group List (class), define your class as type "Address", then use matchclass instead of findclass.
First define these classes as type "Address":
class LDAP_GroupA {
"network 10.16.13.0/26"
"host 10.10.10.1"
}
class myPoolB{
"network 10.16.13.64/26"
"host 10.10.10.2"
}
Then this iRule will distribute the traffic:when RULE_INIT {
set ::defaultPool myPool
}
when CLIENT_ACCEPTED {
TCP::collect
}
when CLIENT_DATA {
set LoginIP [findstr [TCP::payload] LOGIN-IP 9 "MSISDN"]
if {$LoginIP != ""}{
if { [matchclass $LoginIP equals $::LDAP_GroupA]}{
pool PoolA
} elseif { [matchclass $LoginIP equals $::LDAP_GroupB]}{
pool PoolA
}
} else {
pool $::defaultPool
}
TCP::release
}
Any request with no LOGIN-IP value or an address not in either class will go to the default pool.HTH
/deb
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