Permitting and Denying in a irule
Hello I need help to figure out how to permit an if in a irule, something like this...
when HTTP_REQUEST { if {([HTTP::host] equals "something.com") && ( not [class match [IP::client_addr] equals /Partition/User1])} { log local0. "Permit User1 [HTTP::host]/[HTTP::uri] from [IP::client_addr]"
Command for Permit} elseif {
([HTTP::host] equals "something.com") && ( not [class match [IP::client_addr] equals /Partition/User2])} {
log local0. "Permit User2 [HTTP::host]/[HTTP::uri] from [IP::client_addr]"
Command for Permit
} elseif { log local0. "Denying the Rest [HTTP::host]/[HTTP::uri] from [IP::client_addr]" reject } }
Can someone give me a hint?
The right one... when HTTP_REQUEST { if {([HTTP::host] equals "something.com") && ( [class match [IP::client_addr] equals /Partition/User1])} { log local0. "Permit User1 [HTTP::host]/[HTTP::uri] from [IP::client_addr]"
Command for Permit
Command for Permit} elseif { ([HTTP::host] equals "something.com") && ( [class match [IP::client_addr] equals /Partition/User2])} { log local0. "Permit User2 [HTTP::host]/[HTTP::uri] from [IP::client_addr]"
} elseif { log local0. "Denying the Rest [HTTP::host]/[HTTP::uri] from [IP::client_addr]" reject } }