Skip to main content

Digital Ocean

The cipr do command allows you to retrieve IP ranges for Digital Ocean.

Usage

CLI command
cipr do [flags]

Data Format

You can find data format (and filter value guidelines) of the do command output here: Digital Ocean command data format

Flags

FlagDescriptionDefaultRequiredMultiple values
--ipv4Get only IPv4 ranges.
--ipv6Get only IPv6 ranges.
--filter-countryFilter results by country.👍
--filter-regionFilter results by region.👍
--filter-cityFilter results by city (use quotes for names with spaces, e.g. "New York").👍
--filter-zipFilter results by ZIP code.👍
--listList unique values for a dimension instead of IP ranges. Valid: countries, regions, cities, zips.

When neither --ipv4 nor --ipv6 is set, both are fetched. --list composes with the --filter* flags but ignores --ipv4/--ipv6.

Examples

tip

IP ranges in the 'Output' blocks might not be up to date!

Get all Digital Ocean IPv4 ranges

CLI command
cipr do --ipv4
Output
...
198.211.118.0/23
198.211.120.0/21
...

Get all Digital Ocean IPv6 ranges

CLI command
cipr do --ipv6
Output
...
2a03:b0c0:0:1050::/64
2a03:b0c0:0:1051::/64
...

Filter results by country

CLI command
cipr do --filter-country US
Output
...
159.65.32.0/20
2604:a880:2:d0::/64
...

Filter results by region

CLI command
cipr do --filter-region US-SF
Output
...
198.199.116.0/24
2604:a880:1:20::/64
...

Filter results by city

CLI command
cipr do --filter-city "New York"
Output
...
192.241.177.0/24
2604:a880:0:2023::/64
...

Filter results by ZIP

CLI command
cipr do --filter-zip 94124
Output
...
198.199.115.0/24
2604:a880:1:20::/64
...

Set verbosity level to full

CLI command
cipr do --ipv6 --filter-country US -v
Output
...
IP Range: 2604:a880:1:4a::/64, Country: US, Region: US-SF, City: San Francisco, ZIP: 94124
IP Range: 2604:a880:2:d0::/64, Country: US, Region: US-CA, City: Santa Clara, ZIP: 95051
...

List all countries

CLI command
cipr do --list countries
Output
...
DE
NL
SG
US
...

List cities in the Netherlands

CLI command
cipr do --filter-country NL --list cities
Output
Amsterdam