Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save AdroitAdorKhan/413d618be5a5d1c8ce61469a75f2f76d to your computer and use it in GitHub Desktop.

Select an option

Save AdroitAdorKhan/413d618be5a5d1c8ce61469a75f2f76d to your computer and use it in GitHub Desktop.

Revisions

  1. AdroitAdorKhan created this gist Apr 10, 2023.
    16 changes: 16 additions & 0 deletions AWS-Global-Accelerator-IP-Ranges.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    ### Download AWS IP Ranges JSON
    ```bash
    wget https://ip-ranges.amazonaws.com/ip-ranges.json
    ```

    ### Get IPv4 Ranges

    ```bash
    grep -i -B 1 '"region": "GLOBAL",' ip-ranges.json | grep '"ip_prefix":' | awk -F'"' '{print $4}' > AWS-Global-v4.txt
    ```

    ### Get IPv6 Ranges

    ```bash
    grep -i -B 1 '"region": "GLOBAL",' ip-ranges.json | grep '"ipv6_prefix":' | awk -F'"' '{print $4}' > AWS-Global-v6.txt
    ```