Forum Discussion

SK391_339749's avatar
SK391_339749
Icon for Nimbostratus rankNimbostratus
Mar 19, 2018

Add WAF firewall policy to VIPs via CLI

Hi all,

 

I have a number of WAF policies built in on our F5. I'm looking to test them by assigning the policies to our various VIPs. We have over 200 VIPs so this is going to take some time. I know I can do with by using a product such as Postman etc , however I'm not at the level yet and wanted to know if there is way to do it through command line?

 

I need to do the following through the CLI rather than GUI

 

Security-> Policies -> Application Security Policy -> Enabled - Then select the required policy.

 

Is there anyway this can be done via the CLI?

 

Thanks in advance.

 

2 Replies

  • please try

    tmsh modify ltm virtual  profiles add { websecurity } policies add { asm_auto_l7_policy__xxxxxx }
    
    • SK391_339749's avatar
      SK391_339749
      Icon for Nimbostratus rankNimbostratus

      Hi ,

       

      Thanks for this, I think I'm nearly there. I have a WAF policy called abc_WAF.

       

      I'm entering in your command but it's erroring at the abc_WAF part.

       

      modify ltm virtual test123 profiles add { websecurity } policies add { asm_auto_l7_policy__abc_WAF }

       

      Do you know where I'm going wrong?