// MICROSOFT365 / NGINX
microsoft365 · Nginx
Nginx allow/deny config for microsoft365. Drop into your server block or http context. 93 CIDRs, refreshed daily.
// nginx_microsoft365_allow.conf
# Microsoft365 IP Ranges # Updated: 2026-07-12 03:46:18 # 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_microsoft365_allow.conf; allow 13.107.6.152/31; allow 13.107.6.171/32; allow 13.107.6.192/32; allow 13.107.9.192/32; allow 13.107.18.10/31; allow 13.107.18.15/32; allow 13.107.128.0/22; allow 13.107.136.0/22; allow 13.107.140.6/32; allow 20.20.32.0/19; allow 20.190.128.0/18; allow 20.231.128.0/19; allow 23.103.160.0/20; allow 40.92.0.0/15; allow 40.96.0.0/13; … (68 more lines)
// nginx_microsoft365_deny.conf
# Microsoft365 IP Ranges # Updated: 2026-07-12 03:46:18 # 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_microsoft365_deny.conf; deny 13.107.6.152/31; deny 13.107.6.171/32; deny 13.107.6.192/32; deny 13.107.9.192/32; deny 13.107.18.10/31; deny 13.107.18.15/32; deny 13.107.128.0/22; deny 13.107.136.0/22; deny 13.107.140.6/32; deny 20.20.32.0/19; deny 20.190.128.0/18; deny 20.231.128.0/19; deny 23.103.160.0/20; deny 40.92.0.0/15; deny 40.96.0.0/13; … (68 more lines)