Forum Discussion
Kai_Wilke
Feb 25, 2016MVP
Hi
you may try the iRule below as a starting point...
when CLIENT_ACCEPTED {
if { [class match [IP::client_addr] equals whitelistIP] } then {
pool insert_your_pool_name
} else {
switch -exact -- [whereis [IP::client_addr] country] {
"DE" -
"AT" -
"CH" -
"LI" -
"LU" {
pool insert_your_pool_name
}
default {
reject
}
}
}
}
Note: Reordered the
and [if]
nestings, optimized the [switch]
command and finally changed the [switch]
(is a deprecated command) to become [matchclass]
.[class match]
Cheers, Kai