ccraddock_33000
Feb 22, 2018Nimbostratus
iRule assistance
I have an iRule in my environment that was not written by me. This iRule is supposed to block anyone from an external IP from reaching the "heartbeat" page of our web servers. It is written as such:
when HTTP_REQUEST {
if { [string tolower [HTTP::path]] contains "/heartbeat" } {
if { !([matchclass [IP::client_addr] equals private_net])} {
discard
}
}
}
My question is twofold.
1) Is the exclamation point (!) in the second "if" statement excluding the "private_net" parameter. The iRules name is irule_block_heartbeat_from_external_IPs but the private_net data group is made up of internal IP's (10.0.0.0, 172.16.0.0. 192.168.0.0 etc).
2) I would like to add "/health" to this iRule as well, in addition to the "/heartbeat" how would i do that?
Thanks.