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

Qasim's avatar
Qasim
Icon for Cirrostratus rankCirrostratus
Oct 30, 2019

IRule to Block a particular URL but allow everything else

Hi,

 

wondering if you can help me with an Irule that basically looks at the FQDN e.g. test.abc.com and if the URL matches e.g. /absauth/service* that rquest is blocked. but everything else is allowed.

 

I will really appreciate your help with this.

 

Regards,

7 Replies

  • Hi Qasim,

    Can you try this iRule?

    when HTTP_REQUEST {
    	if { ([HTTP::host] equals "test.abc.com") && ([string tolower [HTTP::uri]] starts_with "/absauth/service") } {
    		reject
    	}
    }
    • Qasim's avatar
      Qasim
      Icon for Cirrostratus rankCirrostratus

      Hi Eaa,

       

      thanks for your swift response but if I want to add another line for example everything else should be redirected to pool : abc123.

       

      how would that look like?

       

      Regards,

      Qasim

      • If you use pool_abc123 as default pool, you don't need else statement.

        If you don't have default pool, you can use this iRule:

        when HTTP_REQUEST {
        	if { ([HTTP::host] equals "test.abc.com") && ([string tolower [HTTP::uri]] starts_with "/absauth/service") } {
        		reject
        	} else  {
        		pool abc123
        	}
        }
  • Qasim's avatar
    Qasim
    Icon for Cirrostratus rankCirrostratus

    Hi Enes,

     

    I posted this question a while ago but never received a proper response but wondering if you can help me with the following:

     

     

    I want to publish 4 services externally (internet) and internally (LAN/WAN) and want to have a cross DC failover but I have a limited number of public IP addresses so would like use a single VS. Wondering, how can I go about this? I want all services to fail dynamically if one of the services have failed?

    can anyone help please?

     

    Thanks.