{"id":1001,"date":"2018-11-21T21:01:39","date_gmt":"2018-11-21T14:01:39","guid":{"rendered":"https:\/\/www.whplus.com\/blog\/?p=1001"},"modified":"2018-11-21T21:03:58","modified_gmt":"2018-11-21T14:03:58","slug":"csf-wp-login-attempts-block","status":"publish","type":"post","link":"https:\/\/www.whplus.com\/blog\/2018\/11\/21\/csf-wp-login-attempts-block.html","title":{"rendered":"CSF wp-login attempts block"},"content":{"rendered":"<p>In order to block IP&#8217;s that flood wp-login.php attempts by using CSF regex.custom.pm<br \/>\n<code>if (($globlogs{CUSTOM2_LOG}{$lgfile}) and ($line =~ \/(\\S+).*] \"\\w*(?:GET) \\\/wp-login\\.php.*\" \/)) {<br \/>\nreturn (\"Failed WordPress GET\",$1,\"WPLOGINGET\",\"3\",\"80,443,21,25,22,23\",\"1\");<br \/>\n}<br \/>\nif (($globlogs{CUSTOM2_LOG}{$lgfile}) and ($line =~ \/(\\S+).*] \"\\w*(?:POST) \\\/wp-login\\.php.*\" \/)) {<br \/>\nreturn (\"Failed WordPress POST\",$1,\"WPLOGINPOST\",\"3\",\"80,443,21,25,22,23\",\"1\");<br \/>\n}<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In order to block IP&#8217;s that flood wp-login.php attempts by using CSF regex.custom.pm if (($globlogs{CUSTOM2_LOG}{$lgfile}) and ($line =~ \/(\\S+).*] &#8220;\\w*(?:GET) \\\/wp-login\\.php.*&#8221; \/)) { return (&#8220;Failed WordPress GET&#8221;,$1,&#8221;WPLOGINGET&#8221;,&#8221;3&#8243;,&#8221;80,443,21,25,22,23&#8243;,&#8221;1&#8243;); } if (($globlogs{CUSTOM2_LOG}{$lgfile}) and ($line =~ \/(\\S+).*] &#8220;\\w*(?:POST) \\\/wp-login\\.php.*&#8221; \/)) { return (&#8220;Failed WordPress POST&#8221;,$1,&#8221;WPLOGINPOST&#8221;,&#8221;3&#8243;,&#8221;80,443,21,25,22,23&#8243;,&#8221;1&#8243;); }<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-1001","post","type-post","status-publish","format-standard","hentry","category-tutorial"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.whplus.com\/blog\/wp-json\/wp\/v2\/posts\/1001","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.whplus.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.whplus.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.whplus.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.whplus.com\/blog\/wp-json\/wp\/v2\/comments?post=1001"}],"version-history":[{"count":2,"href":"https:\/\/www.whplus.com\/blog\/wp-json\/wp\/v2\/posts\/1001\/revisions"}],"predecessor-version":[{"id":1003,"href":"https:\/\/www.whplus.com\/blog\/wp-json\/wp\/v2\/posts\/1001\/revisions\/1003"}],"wp:attachment":[{"href":"https:\/\/www.whplus.com\/blog\/wp-json\/wp\/v2\/media?parent=1001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.whplus.com\/blog\/wp-json\/wp\/v2\/categories?post=1001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.whplus.com\/blog\/wp-json\/wp\/v2\/tags?post=1001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}