Forum Discussion
Andy_McGrath
Dec 07, 2018Cumulonimbus
Setup a data group with type IP Addresses and add the allowed IP address subnets to it, name it ‘allowed_ip_addresses’ and the following iRule should do the job.
when HTTP_REQUEST {
set httpUri [string tolower [HTTP::uri]]
set clientIp [getfield [IP::client_addr] “%” 1]
check uri path and cline tip is not in the allowed list
if {($httpUri starts_with "/path2") && !([class match $clientIp allowed_ip_addresses])} {
drop or reject to end the connection
drop
}
}