Skip to content

Instantly share code, notes, and snippets.

@sshimko
Last active October 27, 2021 19:55
Show Gist options
  • Save sshimko/766d3d8681d481306ab1152189bac34a to your computer and use it in GitHub Desktop.
Save sshimko/766d3d8681d481306ab1152189bac34a to your computer and use it in GitHub Desktop.
Current AWS GovCloud IPs - useful for firewall (letting them in or keeping them out)
#!/bin/sh
# Fetch current govcloud IP ranges
/usr/bin/curl -s https://ip-ranges.amazonaws.com/ip-ranges.json | jq -r '[.prefixes]|.[]|.[] | select(.region|test("us-gov")) | .ip_prefix| gsub("\""; "")'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment