Simple Script for Getting the List of Public IP Addresses for VCNs and the Oracle Services Network for a Specific Region

Oracle publishes the list of IP ranges here. With the script provided you can get the list of IP’s from your command line.

# change the Region Identifier in bold for the one you are interested in. List of regions here:
docker run -i stedolan/jq < public_ip_ranges.json '.regions[] | select (.region=="eu-frankfurt-1") | .cidrs[] | select (.cidr | contains(".")) | .cidr' | sed 's/"//g'
# thats all

Output example

Hope it helps!

See also here and here

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.