// BAIDU / NGINX
baidu · Nginx
Nginx allow/deny config for baidu. Drop into your server block or http context. 195 CIDRs, refreshed daily.
// nginx_baidu_allow.conf
# Baidu IP Ranges # Updated: 2026-07-12 03:46:25 # 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_baidu_allow.conf; allow 42.199.240.0/22; allow 45.113.192.0/23; allow 45.113.194.0/24; allow 103.235.44.0/22; allow 104.193.88.0/23; allow 104.193.90.0/24; allow 106.12.0.0/17; allow 106.12.128.0/18; allow 106.12.192.0/19; allow 106.12.224.0/20; allow 106.12.240.0/21; allow 106.13.0.0/17; allow 106.13.128.0/18; allow 106.13.192.0/19; allow 106.13.224.0/20; … (35 more lines)
// nginx_baidu_deny.conf
# Baidu IP Ranges # Updated: 2026-07-12 03:46:25 # 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_baidu_deny.conf; deny 42.199.240.0/22; deny 45.113.192.0/23; deny 45.113.194.0/24; deny 103.235.44.0/22; deny 104.193.88.0/23; deny 104.193.90.0/24; deny 106.12.0.0/17; deny 106.12.128.0/18; deny 106.12.192.0/19; deny 106.12.224.0/20; deny 106.12.240.0/21; deny 106.13.0.0/17; deny 106.13.128.0/18; deny 106.13.192.0/19; deny 106.13.224.0/20; … (35 more lines)