{"id":686,"date":"2016-10-18T21:58:38","date_gmt":"2016-10-18T21:58:38","guid":{"rendered":"http:\/\/192.168.1.102\/?p=686"},"modified":"2016-10-18T21:58:38","modified_gmt":"2016-10-18T21:58:38","slug":"denyhosts-on-centos","status":"publish","type":"post","link":"https:\/\/digitalsos.net\/?p=686","title":{"rendered":"Denyhosts on CentOS"},"content":{"rendered":"<p>In general, I install fail2ban and denyhosts on all of my external linux servers that have port 22 open.\u00a0 This is generally only because sftp is also installed on these systems because marketing people don&#8217;t know any other options like S3 on AWS.<\/p>\n<p>I want to point out the files that need to be looked at before you enable the deamon mode via: sudo service denyhosts start.<\/p>\n<p>First is the config located at \/etc\/denyhosts.conf.\u00a0 That tells it to look at your \/var\/log\/secure and update the \/etc\/host.deny file among other things<\/p>\n<p>If you have IP&#8217;s or hosts that need to be whitelisted, you need to add them to a file that belongs to denyhosts.\u00a0 It&#8217;s at: \/var\/lib\/denyhosts\/allowed-hosts<\/p>\n<p>Once you start the service it will list all of the hosts that will be denied, verify that the list doesn&#8217;t include anything that matters to you.\u00a0 If it does then you need to stop the service and delete those entries from \/etc\/hosts.deny and add them to \/var\/lib\/denyhosts\/allowed-hosts<\/p>\n<p>Then enable it at startup with: sudo chkconfig denyhosts on<\/p>\n<p>And if you on systemctl then take a look here for startup: <a href=\"http:\/\/192.168.1.102\/?p=45\">http:\/\/192.168.1.102\/?p=45<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In general, I install fail2ban and denyhosts on all of my external linux servers that have port 22 open.\u00a0 This is generally only because sftp is also installed on these systems because marketing people don&#8217;t know any other options like S3 on AWS. I want to point out the files that need to be looked<\/p>\n<div class=\"read-more-wrapper\"><a class=\"read-more\" href=\"https:\/\/digitalsos.net\/?p=686\" title=\"Read More\"> <span class=\"button \">Read More<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[33,19],"tags":[],"class_list":["post-686","post","type-post","status-publish","format-standard","hentry","category-infrastructure","category-linux"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pgxmGV-b4","_links":{"self":[{"href":"https:\/\/digitalsos.net\/index.php?rest_route=\/wp\/v2\/posts\/686","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digitalsos.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digitalsos.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digitalsos.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/digitalsos.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=686"}],"version-history":[{"count":2,"href":"https:\/\/digitalsos.net\/index.php?rest_route=\/wp\/v2\/posts\/686\/revisions"}],"predecessor-version":[{"id":688,"href":"https:\/\/digitalsos.net\/index.php?rest_route=\/wp\/v2\/posts\/686\/revisions\/688"}],"wp:attachment":[{"href":"https:\/\/digitalsos.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=686"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digitalsos.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=686"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digitalsos.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=686"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}