{"id":1204,"date":"2014-10-05T04:03:44","date_gmt":"2014-10-05T04:03:44","guid":{"rendered":"http:\/\/www.omniweb.com\/wordpress\/?p=1204"},"modified":"2014-10-05T04:03:44","modified_gmt":"2014-10-05T04:03:44","slug":"how-to-block-all-ports-with-fail2ban","status":"publish","type":"post","link":"https:\/\/www.omniweb.com\/wordpress\/?p=1204","title":{"rendered":"How to Block all ports with Fail2ban"},"content":{"rendered":"<p>This was difficult to find so I&#8217;m noting it here for future reference.  To block all ports with fail2ban, change the jail file&#8217;s port value to &#8220;0:65535&#8221;<\/p>\n<p>For example, here&#8217;s my SSH Jail file:<\/p>\n<blockquote><p>[ssh-iptables]<br \/>\nenabled  = true<br \/>\nfilter   = sshd<br \/>\naction   = iptables[name=SSH, port=&#8221;0:65535&#8243;, protocol=tcp]<br \/>\n           sendmail-whois[name=SSH, dest=nospam@example.com, sender=nospam@example.com, sendername=&#8221;Fail2Ban&#8221;]<br \/>\nlogpath  = \/var\/log\/secure<br \/>\nmaxretry = 3<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>This was difficult to find so I&#8217;m noting it here for future reference. To block all ports with fail2ban, change the jail file&#8217;s port value to &#8220;0:65535&#8221; For example, here&#8217;s my SSH Jail file: [ssh-iptables] enabled = true filter = &hellip; <a href=\"https:\/\/www.omniweb.com\/wordpress\/?p=1204\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.omniweb.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1204"}],"collection":[{"href":"https:\/\/www.omniweb.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.omniweb.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.omniweb.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.omniweb.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1204"}],"version-history":[{"count":1,"href":"https:\/\/www.omniweb.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1204\/revisions"}],"predecessor-version":[{"id":1205,"href":"https:\/\/www.omniweb.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1204\/revisions\/1205"}],"wp:attachment":[{"href":"https:\/\/www.omniweb.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1204"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.omniweb.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1204"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.omniweb.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1204"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}