Forum Discussion
Can I ask if the IPs are representable in CIDR notation? Or are they totally random/unique? Because if it's the former, this can be done without any code from the ASM console from the address exceptions menu. If not, I am happy to work with you and craft a script to do this using the Python SDK for F5 as I would have some use for that, too. That said - it will probably involve looping through API calls so not sure if that will be feasible for you based on what you said about needing to do so in the body of a single request.
- christopherlloyJun 14, 2019Altostratus
Cameron, I am trying to do something similar in python using curl through the os module. The same curl command works from the CLI, but from python I get " Unkown field 'ignoreIpReputation' ". Deleting that field as a test, another field shows up as unknown. Here is the curl command:
curl -k -u UN:PW -H "Content-Type: application/json" -X POST -d '{"ignoreAnomalies":false,"trustedByPolicyBuilder":false,"description":"Baseline","neverLearnRequests":true,"ipMask":"255.255.255.255","ignoreIpReputation":true,"neverLogRequests":true,"ipAddress":"111.111.111.111","kind":"tm:asm:policies:whitelist-ips:whitelist-ipstate","neverBlockRequests":true}' https://222.222.222.222/mgmt/tm/asm/policies/g0bBBeDlyGoOK2_57
Any help would be greatly appreciated. This is on ASM v11