{"id":500,"date":"2011-02-19T11:47:31","date_gmt":"2011-02-19T09:47:31","guid":{"rendered":"http:\/\/blog.sfsoft.it\/?p=500"},"modified":"2011-02-19T11:48:17","modified_gmt":"2011-02-19T09:48:17","slug":"proteggere-un-server-ssh-da-un-attacco-tramite-brute-force","status":"publish","type":"post","link":"https:\/\/www.sfsoft.it\/blog\/2011\/02\/19\/proteggere-un-server-ssh-da-un-attacco-tramite-brute-force\/","title":{"rendered":"Proteggere un server SSH da un attacco tramite brute-force"},"content":{"rendered":"<p>Per proteggere un\u00a0 server SSH da un attacco di tipo brute-force sono sufficienti poche righe di comandi da dare a <em>iptables<\/em>.<\/p>\n<p>I comandi seguenti fanno si che il server accetti massimo 8 tentativi al minuto, in caso i tentativi siano maggiori respinge tutti gli altri:<\/p>\n<p>[plain]<br \/>\niptables -A INPUT -p tcp &#8211;dport 22 -m state &#8211;state NEW -m recent &#8211;set &#8211;name SSH<br \/>\niptables -A INPUT -p tcp &#8211;dport 22 -m state &#8211;state NEW -m recent &#8211;update &#8211;seconds 60 &#8211;hitcount 8 &#8211;rttl &#8211;name SSH -j LOG &#8211;log-prefix &quot;SSH_brute_force &quot;<br \/>\niptables -A INPUT -p tcp &#8211;dport 22 -m state &#8211;state NEW -m recent &#8211;update &#8211;seconds 60 &#8211;hitcount 8 &#8211;rttl &#8211;name SSH -j DROP<br \/>\n[\/plain]<\/p>\n<p>Come sempre consiglio di consultare la fonte dell&#8217;articolo in quanto ci sono anche altri consigli utili<\/p>\n<p><a href=\"http:\/\/radu.cotescu.com\/ssh-brute-force-attacks\/\" target=\"_blank\">http:\/\/radu.cotescu.com\/ssh-brute-force-attacks\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Per proteggere un\u00a0 server SSH da un attacco di tipo brute-force sono sufficienti poche righe di comandi da dare a iptables. I comandi seguenti fanno si che il server accetti massimo 8 tentativi al minuto, in caso i tentativi siano maggiori respinge tutti gli altri: [plain] iptables -A INPUT -p tcp &#8211;dport 22 -m state [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[11,15,3,68],"tags":[12,16,39,8,70,30],"_links":{"self":[{"href":"https:\/\/www.sfsoft.it\/blog\/wp-json\/wp\/v2\/posts\/500"}],"collection":[{"href":"https:\/\/www.sfsoft.it\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sfsoft.it\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sfsoft.it\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sfsoft.it\/blog\/wp-json\/wp\/v2\/comments?post=500"}],"version-history":[{"count":5,"href":"https:\/\/www.sfsoft.it\/blog\/wp-json\/wp\/v2\/posts\/500\/revisions"}],"predecessor-version":[{"id":504,"href":"https:\/\/www.sfsoft.it\/blog\/wp-json\/wp\/v2\/posts\/500\/revisions\/504"}],"wp:attachment":[{"href":"https:\/\/www.sfsoft.it\/blog\/wp-json\/wp\/v2\/media?parent=500"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sfsoft.it\/blog\/wp-json\/wp\/v2\/categories?post=500"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sfsoft.it\/blog\/wp-json\/wp\/v2\/tags?post=500"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}