{"id":1836,"date":"2014-08-06T08:39:59","date_gmt":"2014-08-06T07:39:59","guid":{"rendered":"http:\/\/gmbd.de\/?p=1836"},"modified":"2014-08-06T08:39:59","modified_gmt":"2014-08-06T07:39:59","slug":"a-more-aggressiv-fail2ban","status":"publish","type":"post","link":"https:\/\/gmbd.de\/wordpress\/index.php\/2014\/08\/06\/a-more-aggressiv-fail2ban\/","title":{"rendered":"a more aggressiv fail2ban"},"content":{"rendered":"<p>\t\t\t\tSo manche IP-Ranges aus dem Reich der Mitte k\u00f6nnen einen ganz sch\u00f6n auf die Nerven gehen. Kaum blockt fail2ban eine IP geht es gleich mit der n\u00e4chsten aus dem gleichen Class C Netz weiter. Ich hab jetzt mal mein fail2ban so umgebaut, dass nicht nur einfach eine IP geblockt wird, sondern gleich das ganze Class C Netz. Ich bin wie folgt vorgegangen:<\/p>\n<ol>\n<li><strong>action kopieren<\/strong><br \/>\n<code>cp \/etc\/fail2ban\/action.d\/shorewall.conf \/etc\/fail2ban\/action.d\/shorewall24.conf <\/code><\/li>\n<li><strong>actionban und actionunban angepassen<\/strong><br \/>\njeweils <strong>\/24<\/strong> erg\u00e4nzen:<br \/>\n<code>actionban = shorewall drop &lt;ip&gt;\/24<br \/>\nactionunban = shorewall allow &lt;ip&gt;\/24<br \/>\n<\/code>\n<\/li>\n<li><strong>default banaction \u00e4ndern<\/strong><br \/>\nin \/etc\/fail2ban\/jail.conf die folgende Zeile um 24 erg\u00e4nzen<br \/>\n<code>banaction = shorewall24<\/code>\n<\/li>\n<li><strong>fail2ban neu starten<\/strong><br \/>\n<code>\/etc\/init.d\/fail2ban restart<\/code>\n<\/li>\n<\/ol>\n<p>Fertig.<\/p>\n<p>PS: das ganze geht nat\u00fcrlich auch wenn man nicht die Shorewall sondern iptables-multiport als banaction verwendet. Dann eben halt statt shorewall \u00fcberall iptables-multiport verwenden.\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So manche IP-Ranges aus dem Reich der Mitte k\u00f6nnen einen ganz sch\u00f6n auf die Nerven gehen. Kaum blockt fail2ban eine IP geht es gleich mit der n\u00e4chsten aus dem gleichen Class C Netz weiter. Ich hab jetzt mal mein fail2ban so umgebaut, dass nicht nur einfach eine IP geblockt wird, sondern gleich das ganze Class\u2026 <span class=\"read-more\"><a href=\"https:\/\/gmbd.de\/wordpress\/index.php\/2014\/08\/06\/a-more-aggressiv-fail2ban\/\">Weiterlesen &raquo;<\/a><\/span><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[137],"_links":{"self":[{"href":"https:\/\/gmbd.de\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/1836"}],"collection":[{"href":"https:\/\/gmbd.de\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gmbd.de\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gmbd.de\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/gmbd.de\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=1836"}],"version-history":[{"count":0,"href":"https:\/\/gmbd.de\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/1836\/revisions"}],"wp:attachment":[{"href":"https:\/\/gmbd.de\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=1836"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gmbd.de\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=1836"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gmbd.de\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=1836"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}