Forum Discussion
Vivek_K_215226
Nimbostratus
Jun 07, 2017log the client ip if it matches a network in the data group
Hi There, I have data group class which contains both host's and network. I want to log the client ip only if it matches a network and not host.
Ex:
Client ip1: 10.75.18.21
Client ip2: 10.8...
Ilian_Ivanov
Nimbostratus
Jun 07, 2017Hi,
If I am understanding correctly, you can create 2 data groups 1 for host and 1 for network. Then use that iRule:
when CLIENT_ACCEPTED {
if { [ class match [IP::client_addr] equals clients_new_network ] } {
pool new_clients_pool
log local0. "Client IP is [IP::client_addr]"
}
if { [ class match [IP::client_addr] equals clients_new_host ] } {
pool new_clients_pool
}
else {
reject
}
}
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
