Forum Discussion

Hyder_141209's avatar
Hyder_141209
Icon for Altostratus rankAltostratus
Mar 12, 2015

Creating dos profile via iApp

Hello Gurus,

 

I am trying to add a dos profile in the virtual server via iapp. Can enable the logging profile, however cannot enable the dos profile. Any advise will be highly appreciated.

 

set vs_params "$redir_vs_params \ [iapp::substa persist_cmd([iapp::substa \ persist_arr($discourage_persist,$advanced,$ssl_pass_thru,$is_edge)])] \ [iapp::substa firewall_arr($afm_provisioned,$do_firewall,$new_firewall)] \ [iapp::substa \ ip_intelligence_arr($afm_provisioned,$do_firewall,$allow_by_reputation)] \ security-dos-profile replace-all-with { $security_dos } \ security-log-profiles replace-all-with { $security_logging } \ pool [set pool_name [iapp::substa pool_arr($new_pool,$no_pool)]] \ [iapp::substa irule_arr([llength $irule_names])] \ [iapp::substa asm_policy($do_asm,$use_httpclass)]"

 

In the above code line 'security-log-profiles replace-all-with { $security_logging } \' runs fine and the selected logging profile is added to the virtual server. However, while trying to use this line 'security-dos-profile replace-all-with { $security_dos } \' the selected DOS profile is not created and receiving an error message '("security-dos-profile" unknown property....'. It will highly appreciated if you would refer where I can find the details for iapp development guide as well.

 

Cheers.

 

Best regards Hyder

 

4 Replies

  • Hi, I can not test your iApp, then try to use "profiles add { $security_dos }" intead of "security-dos-profile replace-all-with { $security_dos }".

     

  • Fred_Slater_856's avatar
    Fred_Slater_856
    Historic F5 Account

    cjunior is correct: "security-dos-profiles" is not a valid parameter in tmsh. The lesson here is to first test your BIG-IP commands in tmsh, where tab-completion makes it easy to get the syntax right, then insert the commands into your iApp.

     

  • Thanks for your reply guys. Sorry I am quite new to iApp and appreciate if you could provide any documents or reference on parameter details. I am trying to modify the f5.http template as well as trying to create a new virtual server as well as deploying the DoS profile via iapp. Any hints will be highly appreciated.

     

    Cheers.

     

  • Apologies. I think I was trying to modify something in a wrong place. The correct place is:

     

    • { [iapp::conf create ltm virtual ${app}_vs \ destination [iapp::destination $::pool__addr $::pool__port] \ mask $mask \ $vs_params \ ip-protocol tcp \ mirror $mirror_action \ profiles replace-all-with { $vs_profiles } \ profiles add { $security_dos } \ rules { [iapp::substa hsl_irule($::pool__port_secure)] }]}

    Thanks for directing in a right way to find the tmsh commands.

     

    Cheers.

     

    Best regards Hyder