Forum Discussion
Lee_Sutcliffe
Apr 23, 2018Nacreous
You could simply the logic by placing different host headers into a datagroup:
**DATAGROUP**
ltm data-group internal host_dg {
records {
test1.technion.ac.il {}
test2.technion.ac.il {}
test3.technion.ac.il {}
test4.technion.ac.il {}
}
type string
}
**iRULE**
when HTTP_REQUEST {
if {([class match [HTTP::host] starts_with host_dg]) && ([IP::addr[IP::remote_addr] equals 10.10.10.10/255.255.255.255])} {
HTTP::respond 404 "Not Found" "Connection" "close"
log local0. "This Connetion blocked By iRule My-iRule"
}
}