// AWS / NGINX
AWS · Nginx
Nginx allow/deny config for AWS. Drop into your server block or http context. 15,877 CIDRs, refreshed daily.
// nginx_aws_allow.conf
# Aws IP Ranges # Updated: 2026-05-26 03:19:23 # 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_aws_allow.conf; allow 3.4.12.4/32; allow 3.5.140.0/22; allow 15.190.244.0/22; allow 15.230.15.29/32; allow 15.230.15.76/31; allow 15.230.221.0/24; allow 15.248.168.0/21; allow 23.254.120.0/21; allow 35.180.0.0/16; allow 51.85.0.0/16; allow 52.93.153.170/32; allow 52.93.178.234/32; allow 52.93.244.0/24; allow 52.94.76.0/22; allow 52.95.36.0/22; … (15863 more lines)
// nginx_aws_deny.conf
# Aws IP Ranges # Updated: 2026-05-26 03:19:23 # 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_aws_deny.conf; deny 3.4.12.4/32; deny 3.5.140.0/22; deny 15.190.244.0/22; deny 15.230.15.29/32; deny 15.230.15.76/31; deny 15.230.221.0/24; deny 15.248.168.0/21; deny 23.254.120.0/21; deny 35.180.0.0/16; deny 51.85.0.0/16; deny 52.93.153.170/32; deny 52.93.178.234/32; deny 52.93.244.0/24; deny 52.94.76.0/22; deny 52.95.36.0/22; … (15863 more lines)