diff --git a/wo/cli/templates/wpcommon.mustache b/wo/cli/templates/wpcommon.mustache index b69ac38..3bb6b3f 100644 --- a/wo/cli/templates/wpcommon.mustache +++ b/wo/cli/templates/wpcommon.mustache @@ -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}}; }