Created
April 10, 2023 09:38
-
-
Save AdroitAdorKhan/413d618be5a5d1c8ce61469a75f2f76d to your computer and use it in GitHub Desktop.
Revisions
-
AdroitAdorKhan created this gist
Apr 10, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal 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 ```