Forum Discussion
Do not allow IP through https
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
- NGX_IT_134965
Nimbostratus
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 } }
- Emad_26973
Cirrus
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 }
- NGX_IT_134965
Nimbostratus
Thank you very much everyone, the first one worked great for me :).
- NGX_IT_134965
Nimbostratus
Thank you very much everyone, the first one worked great for me :).
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com