For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Snl's avatar
Snl
Icon for Cirrostratus rankCirrostratus
Jan 15, 2020

Restrict Access

Folks

 

i have below requirement , is this possible to achieve using Irule or ASM

 

Website IP 1.1.1.1

DNS. abc.com

 

If any user try to access https://abc.com allow ,if any user try to access https://1.1.1.1 block , basically i want to block all users who wants to access the URL using IP instead of FQDN

 

Thanks

Snl

 

 

3 Replies

  • Hi,

     

    Maybe something link this?

     

    1. when HTTP_REQUEST {
    2. If { !([HTTP::host] equals "1.2.3.4") } {
    3. Reject
    4. }
    5. }

     

  • Snl's avatar
    Snl
    Icon for Cirrostratus rankCirrostratus

    requirement slight different now

     

    anyone trying to access https://1.1.1.1 should redirect to https:/abc.com

     

    client should not able browser url with IP address

     

    thanks

    Snl

     

    • try a search on how to do a redirect in an irule.

       

      look here: https://clouddocs.f5.com/api/irules/HTTP__redirect.html

       

      use that instead of the redirect and you should be good to go