[aws-cli]AWS WAFのIPSetsの一覧表示とIP追加をする

LINEで送る
Pocket

https://aws.amazon.com/jp/premiumsupport/knowledge-center/maintain-waf-ipsets-using-cli/

AWS WAF Classic > IP addresses

  • tokenの確認
$ aws waf-regional get-change-token
{
    "ChangeToken": "xxxxxxxx-b667-4f0a-a655-e4bc49eaa2c4"
}
  • IPSetsの一覧を確認
$ aws waf-regional list-ip-sets
{
    "IPSets": [
        {
            "IPSetId": "xxxxxxxxx-102b-4d7a-9532-80fb97e4c281",
            "Name": "test-ipset"
        }
    ],
    "NextMarker": "xxxxxxxxx-102b-4d7a-9532-80fb97e4c281"
}
  • IP Address追加
$ aws waf-regional update-ip-set --ip-set-id xxxxxxxxxxx-4473-b55e-0baf70ee00a7 --change-token xxxxxxxxxx-9e97-4b1d-82e0-ea0bbc8938e1 --updates Action="INSERT",IPSetDescriptor='{Type="IPV4",Value="xxx.xxx.x.x/16"}' Action="INSERT",IPSetDescriptor='{Type="IPV4",Value="xx.xxx.xxx.x/17"}' Action="INSERT",IPSetDescriptor='{Type="IPV4",Value="xxx.xxxx.xxx.xxx/17"}'

Was this helpful?

0 / 0

コメントを残す 0

Your email address will not be published. Required fields are marked *