Diago1111
Oct 14, 2021Altocumulus
F5 irule set restrictaccess 0 & 1 command.
Hi All,
I'm newbie to F5 irule and kind of stuck in understanding the syntax, especially not able to figure out what does "set restrictaccess 1" and "set restrictaccess 0" have effect here.
ltm rule Drop_Xyz_Requests {
partition Xyz
priority 10
when CLIENT_ACCEPTED {
set restrictaccess 1
if { [class match [IP::client_addr] equals corp_Vlan10-Vlan80] ||
} {
set restrictaccess 0
}
}
when HTTP_REQUEST {
if {$restrictaccess} {
if { ! (([string tolower [HTTP::path]] starts_with ""/xxx-xxx-xxxx/api/"") ||
} {
HTTP::respond 403 content {<html>403 Forbidden - Access Denied</html>}
}
}
}
}"