http host request lock down

Hello,

I am trying to write a simple irule that locks down the HTTP host request to the specific FQDN - e.g., app.mydomain.com. I don’t want anyone typing in the short name app or the VIP IP address to be sent to the backend pool.

Also can this be achieved by using the LTM policy manager instead? Which is the preferred method in this scenario?

The following irule still allows everything else, even though I specified equals the host FQDN.

when HTTP_REQUEST { if { [HTTP::header “Host”] equals “app.mydomain.com” } {

} }

try this instead:

when HTTP_REQUEST { 
   if { not ([HTTP::header "Host"] equals "app.mydomain.com" }  {  
       reject 
     } 
 }

See how that goes,

N