Hello,
I am inquiring on how to do the following:
Do not allow IP access through HTTPS
Example: https://33.33.33.33 < - Don’t allow this https://dns.name.com < - Allow this only
I am not sure how about to search this through the F5 Dev Central articles, any help is greatly appreciated.
Thanks
BIG-IP v11.5.1 is what I am running
Try this:
when HTTP_REQUEST {
if { !([string tolower [HTTP::host]] equals "dns.name.com") } {
reject
}
}
Another Approach will be to add all virtual server IPs in a data group and write a generic irule to deny request, you can either reject or send HTML having access denied message e.g
ltm rule fqdn_access {
when HTTP_REQUEST {
if {[class match [HTTP::host] equals VIP_IPs] }{
HTTP::respond 200 content {
Access Denied
We are sorry. Use FQDN to access.
}
}
}
}
DataGroup
ltm data-group internal VIP_IPs {
records {
33.33.33.33 { }
33.33.33.34 { }
}
type string
}
Thank you very much everyone, the first one worked great for me :).
Thank you very much everyone, the first one worked great for me :).