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.

#
wget https://docs.cloud.oracle.com/iaas/tools/public_ip_ranges.json
# change the Region Identifier in bold for the one you are interested in. List of regions here: https://docs.cloud.oracle.com/en-us/iaas/Content/General/Concepts/regions.htm
#
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:

WordPress.com Logo

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

Google photo

You are commenting using your Google 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.

%d bloggers like this: