Forum Discussion

JulienDebbia_20's avatar
JulienDebbia_20
Icon for Nimbostratus rankNimbostratus
Jan 19, 2016

How to create a rule in a network rule-list?

Hello,

 

I'm trying to create a rule inside a rule-list with this command:

 

curl -sk -u user:pwd -H "Content-Type: application/json" -X POST "" -d '{"name":"toto"}'

 

I have an error during the creation:

 

Rule entries that are being added with the \"add\" option must specify either \"place-before\" or \"place-after\"

 

Where do I need to add the "place-after" or "place-before"?

 

I tried many thnigs without success...

 

Thank you.

 

Best regards

 

2 Replies

  • The solution:

    curl -sk -u user:pwd -H "Content-Type: application/json" -X POST "https://ip/mgmt/tm/security/firewall/rule-list/~Common~ltm_vs_allow_http/rules" -d '{"name":"toto", "action":"accept", "place-before":"first"}'

    • JRahm's avatar
      JRahm
      Icon for Admin rankAdmin
      obviously you'd want that to be more complete than just a name and accept, but that makes it easy in this space to understand the mechanics. Glad you found your own answer!