Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Clear all filters
Answers

apply different ASM policy based on URI content

Hi,

I have three URLs hosted on single server and mapped to one VS on ASM working with single ASM policy as of now.

Now, i want to create an irule on LTM to differentiate the traffic having /car and /home in URI path. Further i want two different ASM policies to be applied for the traffic having /car in URI and traffic having /home in URI.

Please suggest how to achieve this.

I have understanding to segregate the traffic on LTM by creating irule. After creating an irule how i will map this segregated traffic to different policy. DO i need to create two VS server for this or i can assign multiple policies to single VS based on the traffic segregation from LTM.

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Sandeep,

Whilst an irule could work for you have you considered doing this via HTTP Class profiles (11.3.0 and before) or Local Traffic Policies (11.4.0 and after)?

All the above can be achieved using these two methods without needing iRules.

Hope this helps,

N

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

Out of interest...an irule would use the ASM::enable command. See ASM__enable.

Something like this:

when HTTP_REQUEST {
 switch -glob [string tolower [HTTP::uri]] {
        "*/car/*" {
           ASM::enable /Common/car_policy
        }
        "*/house/*" {
           ASM::enable /Common/house_policy 
        }
    }
}       
0
Comments on this Answer
Comment made 08-Jan-2015 by Sandeep Kumar 1
thanks nathan, it would be grt help if u cld elaborate a bit for doing it through ltm policy
0
Comment made 08-Jan-2015 by nathan 7337
These two SOLS will be able to explain better than I can . See https://support.f5.com/kb/en-us/solutions/public/15000/000/sol15085.html and https://support.f5.com/kb/en-us/products/big-ip_asm/manuals/product/asm-implementations-11-4-0/20.html. In the latter doc see the section "Creating local traffic policy rules for ASM" which is pretty much what you want to do.
0