// DIGITALOCEAN / NGINX
DigitalOcean · Nginx
Nginx allow/deny config for DigitalOcean. Drop into your server block or http context. 1,219 CIDRs, refreshed daily.
// nginx_digitalocean_allow.conf
# Digitalocean IP Ranges # Updated: 2026-05-20 03:19:32 # Source: https://github.com/rezmoss/cloud-provider-ip-addresses # License: https://github.com/rezmoss/cloud-provider-ip-addresses/LICENSE # This file is generated automatically. Do not edit it directly. # Updates daily at 00:00 UTC # To restrict access to only these IPs in nginx, # add the following line to your server block in your nginx configuration file (e.g., /etc/nginx/nginx.conf or /etc/nginx/sites-available/default): # include /path/to/nginx_digitalocean_allow.conf; allow 5.101.96.0/21; allow 5.101.104.0/22; allow 24.144.64.0/22; allow 24.144.68.0/22; allow 24.144.74.0/23; allow 24.144.76.0/22; allow 24.144.80.0/20; allow 24.144.96.0/19; allow 24.199.64.0/22; allow 24.199.68.0/22; allow 24.199.72.0/21; allow 24.199.80.0/20; allow 24.199.96.0/20; allow 24.199.112.0/20; allow 37.139.0.0/19; … (1205 more lines)
// nginx_digitalocean_deny.conf
# Digitalocean IP Ranges # Updated: 2026-05-20 03:19:32 # Source: https://github.com/rezmoss/cloud-provider-ip-addresses # License: https://github.com/rezmoss/cloud-provider-ip-addresses/LICENSE # This file is generated automatically. Do not edit it directly. # Updates daily at 00:00 UTC # To deny access from these IPs in nginx, # add the following line to your server block in your nginx configuration file (e.g., /etc/nginx/nginx.conf or /etc/nginx/sites-available/default): # include /path/to/nginx_digitalocean_deny.conf; deny 5.101.96.0/21; deny 5.101.104.0/22; deny 24.144.64.0/22; deny 24.144.68.0/22; deny 24.144.74.0/23; deny 24.144.76.0/22; deny 24.144.80.0/20; deny 24.144.96.0/19; deny 24.199.64.0/22; deny 24.199.68.0/22; deny 24.199.72.0/21; deny 24.199.80.0/20; deny 24.199.96.0/20; deny 24.199.112.0/20; deny 37.139.0.0/19; … (1205 more lines)