DevF5_378450
Dec 04, 2018Nimbostratus
Limit access to an uri to a group of IPs
I am new to F5 iRules. We have a need to restrict access to an uri to the limited group of IPs. We have added these IPs to a data group and referenced it in below iRule. Request is still forwarded from F5 though the IP we requested the URL from is not in the IP DataGroup. Is this iRule correct? Thank you.
iRulewhen HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "/temp/servlet.do" } then {
if { not ([class match [IP::client_addr] equals IPDataGroup]) } then {
HTTP::redirect "http://test.com/temp/error.aspx"
}
}
}