{"id":287,"date":"2012-11-12T08:02:59","date_gmt":"2012-11-12T08:02:59","guid":{"rendered":"http:\/\/scunster.co.uk\/?p=287"},"modified":"2014-05-11T19:53:10","modified_gmt":"2014-05-11T19:53:10","slug":"how-to-install-denyhosts-on-ubuntu-centos","status":"publish","type":"post","link":"https:\/\/scunster.co.uk\/?p=287","title":{"rendered":"How to Install DenyHosts on Ubuntu \/ CentOS"},"content":{"rendered":"<p>DenyHosts is a security tool written in python that monitors server access logs to prevent brute force attacks on a virtual private server.<!--more-->The program works by banning IP addresses that exceed a certain number of failed login attempts.<\/p>\n<p><strong>Ubuntu:<\/strong><\/p>\n<pre>sudo apt-get install denyhosts<\/pre>\n<p><strong>CentOS:<\/strong><\/p>\n<pre>sudo yum install denyhosts<\/pre>\n<p>After you install DenyHosts, make sure to whitelist your own IP address. Skipping this step will put you at risk of locking yourself out of your own machine!<\/p>\n<p>edit \/etc\/hosts.allow &amp; add the following: Along with any other trusted IP Adresses<\/p>\n<pre>ALL: localhost\r\nALL: 127.0.0.1<\/pre>\n<p>Save, and restart denyhosts<\/p>\n<pre>\/etc\/init.d\/denyhosts restart<\/pre>\n<p>Email Alerts, you can change denyhosts config by editing \/etc\/denyhosts\/denyhosts.cfg<\/p>\n<p>Comment out the following line to not recieve emails, or add your email address to it if you do want notification every time an ip address is blocked.<\/p>\n<pre>#ADMIN_EMAIL =<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>DenyHosts is a security tool written in python that monitors server access logs to prevent brute force attacks on a virtual private server.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[171],"tags":[],"class_list":["post-287","post","type-post","status-publish","format-standard","hentry","category-security-linux"],"_links":{"self":[{"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=287"}],"version-history":[{"count":10,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/287\/revisions"}],"predecessor-version":[{"id":1076,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=\/wp\/v2\/posts\/287\/revisions\/1076"}],"wp:attachment":[{"href":"https:\/\/scunster.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/scunster.co.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}