// HETZNER / NGINX
Hetzner · Nginx
Nginx allow/deny config for Hetzner. Drop into your server block or http context. 689 CIDRs, refreshed daily.
// nginx_hetzner_allow.conf
# Hetzner IP Ranges # Updated: 2026-06-25 03:23:34 # 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 02: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_hetzner_allow.conf; allow 2.28.0.0/15; allow 5.9.0.0/16; allow 5.75.128.0/17; allow 5.78.0.0/16; allow 5.161.0.0/16; allow 23.88.0.0/17; allow 31.58.88.0/24; allow 37.27.0.0/16; allow 45.15.99.0/24; allow 45.145.227.0/24; allow 46.4.0.0/16; allow 46.62.128.0/17; allow 46.224.0.0/15; allow 49.12.0.0/15; allow 62.238.0.0/17; … (74 more lines)
// nginx_hetzner_deny.conf
# Hetzner IP Ranges # Updated: 2026-06-25 03:23:34 # 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 02: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_hetzner_deny.conf; deny 2.28.0.0/15; deny 5.9.0.0/16; deny 5.75.128.0/17; deny 5.78.0.0/16; deny 5.161.0.0/16; deny 23.88.0.0/17; deny 31.58.88.0/24; deny 37.27.0.0/16; deny 45.15.99.0/24; deny 45.145.227.0/24; deny 46.4.0.0/16; deny 46.62.128.0/17; deny 46.224.0.0/15; deny 49.12.0.0/15; deny 62.238.0.0/17; … (74 more lines)