Merge pull request #494 from ihfbib/master

Nginx Whitelist Jetpack IP ranges for xmlrpc.php
This commit is contained in:
VirtuBox
2023-01-20 23:18:36 +01:00
committed by GitHub

View File

@@ -14,7 +14,26 @@ location = /wp-cron.php {
}
# Prevent DoS attacks with xmlrpc.php
location = /xmlrpc.php {
# Whitelist Jetpack IP ranges, Allow all Communications Between Jetpack and WordPress.com
allow 122.248.245.244/32;
allow 54.217.201.243/32;
allow 54.232.116.4/32;
allow 192.0.80.0/20;
allow 192.0.96.0/20;
allow 192.0.112.0/20;
allow 195.234.108.0/22;
# Deny all other requests
deny all;
# Disable access and error logging
access_log off;
log_not_found off;
# Limit the rate of requests to prevent DoS attacks
limit_req zone=two burst=1 nodelay;
# Pass the request to PHP-FPM backend
include fastcgi_params;
fastcgi_pass {{upstream}};
}