I’ve read about a reliable method to protect my WordPress site against brute force attacks, however it’s for Apache mod_rewrite, and I’d like to use this with Nginx…
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} ^(|.*/)wp-(admin|comments-post|login|signup) [NC]
RewriteCond expr "! %{HTTP_REFERER} -strmatch '*://%{HTTP_HOST}/*'" [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) http://%{REMOTE_HOST}/$ [R=302,L]
Could someone help to “convert” this to nginx?
Add the following code to bottom of your functions.php in theme folder it will stop the ping back request.