Forum Discussion

Randy_Toombs_35's avatar
Randy_Toombs_35
Icon for Nimbostratus rankNimbostratus
Jun 08, 2018

Is there a way to apply a different ASM policy with iRules

We have a need to apply a different ASM policy to an app that is already behind a policy from our main page. For example, there is an iRule that states to send traffic from /differentapp/ to a different pool. Can we also add to disable the one ASM policy and apply a different one in the same iRule?

 

2 Replies

  • Hi,

     

    Niels provided the code to change ASM policy within an iRule as you asked.

     

    But the question is why don't you change the ASM policy in the LTM Policy which assigned the default ASM Policy?

     

    You only have to create a new rule in this policy. This policy can also be used to change pool assignment...

     

    iRules are really powerful, but always try with policies before writing irules.