{"id":32,"date":"2019-07-02T14:04:50","date_gmt":"2019-07-02T14:04:50","guid":{"rendered":"https:\/\/silviamarin.ro\/?p=32"},"modified":"2019-07-02T14:04:50","modified_gmt":"2019-07-02T14:04:50","slug":"instalare-si-setare-fail2ban-2","status":"publish","type":"post","link":"https:\/\/marinelvis.xyz\/index.php\/2019\/07\/02\/instalare-si-setare-fail2ban-2\/","title":{"rendered":"INSTALARE SI SETARE FAIL2BAN"},"content":{"rendered":"<p>Se descarca si se instaleaza Fail2ban:<\/p>\n<pre>apt-get install -y fail2ban<\/pre>\n<p>Setarea se face pe o copie a fisierului de configurare:<\/p>\n<pre>cp \/etc\/fail2ban\/jail.conf \/etc\/fail2ban\/jail.local<\/pre>\n<p>Fisierul nou creat se editeaza:<\/p>\n<pre>nano \/etc\/fail2ban\/jail.local<\/pre>\n<p>Sectiunea <em>DEFAULT<\/em><\/p>\n<blockquote><p><em>ignoreip = 127.0.0.1<\/em><br \/>\n<em>bantime =\u00a0 168h<\/em><br \/>\n<em>findtime = 60m<\/em><br \/>\n<em>maxretry = 3<\/em><\/p><\/blockquote>\n<p>Sectiunea <em>JAILS<\/em><\/p>\n<blockquote><p><em>[ssh]<\/em><br \/>\n<em>enabled\u00a0 = true<\/em><br \/>\n<em>[vsftpd]<\/em><br \/>\n<em>enabled = true<\/em><\/p><\/blockquote>\n<p>Se introduce modulul pentru Webmin:<\/p>\n<blockquote><p><em>[webmin-auth] <\/em><br \/>\n<em>enabled = true <\/em><br \/>\n<em>port = 10000 <\/em><br \/>\n<em>filter = webmin-auth <\/em><br \/>\n<em>logpath = %(syslog_authpriv)s <\/em><br \/>\n<em>backend = %(syslog_backend)s <\/em><br \/>\n<em>maxretry = 3 <\/em><br \/>\n<em>bantime = 168h<\/em><\/p><\/blockquote>\n<p>Se salveaza fisierul si se reporneste Fail2ban<\/p>\n<pre>systemctl restart fail2ban.service<\/pre>\n<p><em>Blocheaza manual un IP<\/em><\/p>\n<pre>fail2ban-client set <em>postfix<\/em> banip xxx.yyy.zzz.ttt<\/pre>\n<p>\u201cpostfix\u201d se inlocuieste cu ssh, sshd sau vsftpd (serviciul atacat)<br \/>\n<em>Blocheaza manual o clasa de IP-uri<\/em><\/p>\n<pre>fail2ban-client set <em>postfix<\/em> banip xxx.yyy.zzz.ttt\/24<\/pre>\n<p>\u201cpostfix\u201d se inlocuieste cu ssh, sshd sau vsftpd (serviciul atacat)<br \/>\nVerifica IP-urile blocate:<\/p>\n<pre>iptables -L<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Se descarca si se instaleaza Fail2ban: apt-get install -y fail2ban Setarea se face pe o copie a fisierului de configurare: cp \/etc\/fail2ban\/jail.conf \/etc\/fail2ban\/jail.local Fisierul nou creat se editeaza: nano \/etc\/fail2ban\/jail.local Sectiunea DEFAULT ignoreip = 127.0.0.1 bantime =\u00a0 168h findtime = 60m maxretry = 3 Sectiunea JAILS [ssh] enabled\u00a0 = true [vsftpd] enabled = true Se [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-32","post","type-post","status-publish","format-standard","hentry","category-fara-categorie"],"_links":{"self":[{"href":"https:\/\/marinelvis.xyz\/index.php\/wp-json\/wp\/v2\/posts\/32","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/marinelvis.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/marinelvis.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/marinelvis.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/marinelvis.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=32"}],"version-history":[{"count":0,"href":"https:\/\/marinelvis.xyz\/index.php\/wp-json\/wp\/v2\/posts\/32\/revisions"}],"wp:attachment":[{"href":"https:\/\/marinelvis.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/marinelvis.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/marinelvis.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}