mtobkes_64700
Mar 11, 2010Nimbostratus
Can iRule Reject Requests Based on 'True-Client-IP'
Can someone please tell me if the LTM v9.4.7 can take action on requests, based on the HTTP header value for 'True-Client-IP'?
We will be 'Akamaizing' parts of our website and will no longer see the clients address in the IP header.
Akamai will insert the client's IP in the HTTP header 'True-Client-IP'. We will now need the ability to block requests based on this layer 7 information.
Here is an iRule I found posted:
when HTTP_REQUEST {
if { [HTTP::header exists "True-Client-IP"] } {
set xff [HTTP::header "True-Client-IP"]
xff may be in format of addr1,addr2,addr3
set addrs [split $xff ","]
foreach addr $addrs {
if { [matchclass $::banned_addr_list equals $addr] } {
reject
}
}
}
}
Will this iRule accomplish what I am trying to do?
Thanks,
-MT