Hi Yugandhar.
You have a syntax problem. your condition need to be explicit for each value.
you can't set one condition with multiple value. look what you should have done:
if { [string tolower [HTTP::host]] equals "access.testxyz45.com" or [string tolower [HTTP::host]] equals equals "abc.testxyz45.com" or [string tolower [HTTP::host]] equals "def.testxyz45.com" or [string tolower [HTTP::host]] equals "mail.testxyz45.com" } {
persist source_addr [IP::client_addr] 600
} else { }
By the way you have to optimise your irule by set your host variable:
set host [string tolower [HTTP::host]]
if { $host == "access.testxyz45.com" || $host == "abc.testxyz45.com" || $host == "def.testxyz45.com" || $host == "mail.testxyz45.com" } {
persist source_addr [IP::client_addr] 600
} else { }
and finally you have to optimize his irula for his execution as shown by lee:
when HTTP_REQUEST {
set host [string tolower [HTTP::host]]
switch -glob $host {
"access.testxyz45.com" -
"abc.testxyz45.com" -
"def.testxyz45.com" -
"mail.testxyz45.com" {
persist source_addr [IP::client_addr]
}
}
}