sandy16
Jun 14, 2016Altostratus
iRule for matching source-ip OR true-client-ip from a datagroup
Hi experts, Need help in writing an iRule that has the following logic -
Request is allowed only if the source-ip OR true-client-ip present in the header (if the request comes via a proxy) are part of a datagroup called "Allowed-ips". Else is dropped.
when HTTP_REQUEST { if { [class match [IP::client_addr] OR [HTTP::header "True-Client-IP"] equals "Allowed-ips" ] }{ Do not interfere (Allowed)
} else {
drop
} } }
This gives me an error for wrong argument. What am i missing, please advise?