block access to VS by IP

hello,

I had a request from our infosec team to block any request accessing the VS by the IP addresss, for example:

our website www.xyz.com , VS IP: 1.2.3.4

if some one try to access the website by typing http://1.2.3.4 it should blocked.

I found one voilation on ASM policy to block that, but I am getting blocking page with support ID.

we need to block it without any blocking page, the request should be dropped like “this page cannot be loaded”

any suggestions please?

You should look for the host header and action for this.

when HTTP_REQUEST {
if {not(([string tolower [HTTP::host]]) equals "www.xyz.com")} {
log local0. "[HTTP::host] requested Invalid - Dropped"
reject
}
}