{"id":172,"date":"2016-06-18T10:43:50","date_gmt":"2016-06-18T05:13:50","guid":{"rendered":"http:\/\/hostmayo.com\/blog\/?p=172"},"modified":"2016-06-18T11:40:46","modified_gmt":"2016-06-18T06:10:46","slug":"install-csf-and-ldf-with-whm-interface","status":"publish","type":"post","link":"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/","title":{"rendered":"Install CSF and LDF with WHM Interface"},"content":{"rendered":"<p><strong>What is CSF <\/strong><\/p>\n<p class=\"subhead\">CSF is Configure Security &amp; Firewall.<\/p>\n<p class=\"subhead\">According to their website it is a Stateful Packet Inspection (SPI) firewall, Login\/Intrusion Detection and Security application for Linux servers.<\/p>\n<p class=\"subhead\">In order to further strengthen our VPS we will learn how to install CSF on Linux with special focus on CentOs 7.<\/p>\n<h3>Install Command<\/h3>\n<p><code><br \/>\ncd \/tmp<br \/>\nrm -fv csf.tgz<br \/>\nwget <a title=\"http:\/\/www.configserver.com\/free\/csf.tgz\" href=\"http:\/\/www.configserver.com\/free\/csf.tgz\">http:\/\/www.configserver.com\/free\/csf.tgz<\/a><br \/>\ntar -xzf csf.tgz<br \/>\ncd csf<br \/>\nsh install.sh<br \/>\nsh \/etc\/csf\/remove_apf_bfd.sh<br \/>\n<\/code><\/p>\n<h3>Post Install Steps<\/h3>\n<ul>\n<li>After a successful install, open WHM and proceed to the <em>Plugins -&gt; ConfigServer Security &amp; Firewall <\/em> page<\/li>\n<li>Click <em>Configure Firewall<\/em> and set the value of <em>TESTING<\/em> to 0<\/li>\n<li>Scroll down and press <em>Change<\/em><\/li>\n<li>Click <em>Restart csf+ldf<\/em><\/li>\n<li>Back on the main <em>ConfigServer Security &amp; Firewall<\/em> page, the <em>Quick Allow<\/em> option can be used to add an IP to the Allow table to prevent being blocked in the event of inadvertent login failures from a trusted IP address.<\/li>\n<\/ul>\n<h3>Troubleshooting<\/h3>\n<h4>Error<\/h4>\n<p><em>iptables LKM ip_tables missing so this firewall cannot function unless you enable MONOLITHIC_KERNEL in \/etc\/csf\/csf.conf<\/em> AND\/OR you receive emails from the server saying <em>lfd failed&#8230;.A restart was attempted automagically<\/em><\/p>\n<h4>Solution<\/h4>\n<ul>\n<li>In WHM, go to ConfigServer Security &amp; Firewall and then click the Configure Firewall button. Scroll down to <em>MONOLITHIC_KERNEL<\/em> and set the value to 1 to enable it. Then press the <em>Change<\/em> button, followed by the <em>Restart csf+ldf<\/em> button on the next page.<\/li>\n<li>OR connect via SSH and edit \/etc\/csf\/csf.conf Then, change from MONOLITHIC_KERNEL = 0 to MONOLITHIC_KERNEL = 1 and save the file and restart the server with<br \/>\n<code><br \/>\ncsf -r<br \/>\n<\/code><\/li>\n<\/ul>\n<h3>Other Notes<\/h3>\n<ul>\n<li>The <em>Check Server Security<\/em> can be used as a base level tool to grade and recommend security items on the web server<\/li>\n<li>To uninstall CSF use<br \/>\n<code><br \/>\nsh \/etc\/csf\/uninstall.sh<\/code><\/li>\n<\/ul>\n<h3>Other Errors<\/h3>\n<p>&#8220;iptables LKM ip_tables missing so this firewall cannot function unless you enable MONOLITHIC_KERNEL in \/etc\/csf\/csf.conf<br \/>\nError: aborted, at line 156&#8221;<\/p>\n<p><strong>To fix:<br \/>\n<\/strong>Open the <strong>\/etc\/csf\/csf.conf<\/strong> and look for a line MONOLITHIC_KERNEL = &#8220;0&#8221; and <strong>change<\/strong> to <strong>MONOLITHIC_KERNEL = &#8220;1&#8221;<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is CSF CSF is Configure Security &amp; Firewall. According to their website it is a Stateful Packet Inspection (SPI) firewall, Login\/Intrusion Detection and Security [&hellip;] <span class=\"read-more-link\"><a class=\"read-more\" href=\"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/\">Read More<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":173,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[10,8,7],"tags":[],"class_list":["post-172","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cpanel","category-hosting","category-vps"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Install CSF and LDF with WHM Interface<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Install CSF and LDF with WHM Interface\" \/>\n<meta property=\"og:description\" content=\"What is CSF CSF is Configure Security &amp; Firewall. According to their website it is a Stateful Packet Inspection (SPI) firewall, Login\/Intrusion Detection and Security [&hellip;] Read More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/\" \/>\n<meta property=\"og:site_name\" content=\"Host Mayo\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Hostmayoservers\" \/>\n<meta property=\"article:published_time\" content=\"2016-06-18T05:13:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2016-06-18T06:10:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2016\/06\/csf_large.png\" \/>\n\t<meta property=\"og:image:width\" content=\"317\" \/>\n\t<meta property=\"og:image:height\" content=\"127\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Billa\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@hostmayo\" \/>\n<meta name=\"twitter:site\" content=\"@hostmayo\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Billa\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/\"},\"author\":{\"name\":\"Billa\",\"@id\":\"https:\/\/hostmayo.com\/blog\/#\/schema\/person\/a511fa95af50c3cb2614311b73c2ea9d\"},\"headline\":\"Install CSF and LDF with WHM Interface\",\"datePublished\":\"2016-06-18T05:13:50+00:00\",\"dateModified\":\"2016-06-18T06:10:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/\"},\"wordCount\":324,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/hostmayo.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2016\/06\/csf_large.png\",\"articleSection\":[\"CPanel\",\"Hosting\",\"vps\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/\",\"url\":\"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/\",\"name\":\"Install CSF and LDF with WHM Interface\",\"isPartOf\":{\"@id\":\"https:\/\/hostmayo.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2016\/06\/csf_large.png\",\"datePublished\":\"2016-06-18T05:13:50+00:00\",\"dateModified\":\"2016-06-18T06:10:46+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/#primaryimage\",\"url\":\"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2016\/06\/csf_large.png\",\"contentUrl\":\"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2016\/06\/csf_large.png\",\"width\":317,\"height\":127,\"caption\":\"CSF\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/hostmayo.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Install CSF and LDF with WHM Interface\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/hostmayo.com\/blog\/#website\",\"url\":\"https:\/\/hostmayo.com\/blog\/\",\"name\":\"Host Mayo\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/hostmayo.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/hostmayo.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/hostmayo.com\/blog\/#organization\",\"name\":\"Host Mayo\",\"url\":\"https:\/\/hostmayo.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hostmayo.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2015\/12\/ico.png\",\"contentUrl\":\"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2015\/12\/ico.png\",\"width\":64,\"height\":64,\"caption\":\"Host Mayo\"},\"image\":{\"@id\":\"https:\/\/hostmayo.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/Hostmayoservers\",\"https:\/\/x.com\/hostmayo\",\"https:\/\/www.linkedin.com\/company\/host-mayo\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/hostmayo.com\/blog\/#\/schema\/person\/a511fa95af50c3cb2614311b73c2ea9d\",\"name\":\"Billa\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/hostmayo.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/55380a32a6c37aba9b35b3d51dbd6cd6460322a433ecdaaacb28aece47163e51?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/55380a32a6c37aba9b35b3d51dbd6cd6460322a433ecdaaacb28aece47163e51?s=96&d=mm&r=g\",\"caption\":\"Billa\"},\"description\":\"Geek, Banker &amp; Entrepreneur.\",\"sameAs\":[\"https:\/\/hostmayo.com\/\"],\"url\":\"https:\/\/hostmayo.com\/blog\/author\/waqass\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Install CSF and LDF with WHM Interface","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/","og_locale":"en_US","og_type":"article","og_title":"Install CSF and LDF with WHM Interface","og_description":"What is CSF CSF is Configure Security &amp; Firewall. According to their website it is a Stateful Packet Inspection (SPI) firewall, Login\/Intrusion Detection and Security [&hellip;] Read More","og_url":"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/","og_site_name":"Host Mayo","article_publisher":"https:\/\/www.facebook.com\/Hostmayoservers","article_published_time":"2016-06-18T05:13:50+00:00","article_modified_time":"2016-06-18T06:10:46+00:00","og_image":[{"width":317,"height":127,"url":"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2016\/06\/csf_large.png","type":"image\/png"}],"author":"Billa","twitter_card":"summary_large_image","twitter_creator":"@hostmayo","twitter_site":"@hostmayo","twitter_misc":{"Written by":"Billa","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/#article","isPartOf":{"@id":"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/"},"author":{"name":"Billa","@id":"https:\/\/hostmayo.com\/blog\/#\/schema\/person\/a511fa95af50c3cb2614311b73c2ea9d"},"headline":"Install CSF and LDF with WHM Interface","datePublished":"2016-06-18T05:13:50+00:00","dateModified":"2016-06-18T06:10:46+00:00","mainEntityOfPage":{"@id":"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/"},"wordCount":324,"commentCount":0,"publisher":{"@id":"https:\/\/hostmayo.com\/blog\/#organization"},"image":{"@id":"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/#primaryimage"},"thumbnailUrl":"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2016\/06\/csf_large.png","articleSection":["CPanel","Hosting","vps"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/","url":"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/","name":"Install CSF and LDF with WHM Interface","isPartOf":{"@id":"https:\/\/hostmayo.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/#primaryimage"},"image":{"@id":"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/#primaryimage"},"thumbnailUrl":"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2016\/06\/csf_large.png","datePublished":"2016-06-18T05:13:50+00:00","dateModified":"2016-06-18T06:10:46+00:00","breadcrumb":{"@id":"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/#primaryimage","url":"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2016\/06\/csf_large.png","contentUrl":"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2016\/06\/csf_large.png","width":317,"height":127,"caption":"CSF"},{"@type":"BreadcrumbList","@id":"https:\/\/hostmayo.com\/blog\/install-csf-and-ldf-with-whm-interface\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/hostmayo.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Install CSF and LDF with WHM Interface"}]},{"@type":"WebSite","@id":"https:\/\/hostmayo.com\/blog\/#website","url":"https:\/\/hostmayo.com\/blog\/","name":"Host Mayo","description":"","publisher":{"@id":"https:\/\/hostmayo.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hostmayo.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/hostmayo.com\/blog\/#organization","name":"Host Mayo","url":"https:\/\/hostmayo.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hostmayo.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2015\/12\/ico.png","contentUrl":"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2015\/12\/ico.png","width":64,"height":64,"caption":"Host Mayo"},"image":{"@id":"https:\/\/hostmayo.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/Hostmayoservers","https:\/\/x.com\/hostmayo","https:\/\/www.linkedin.com\/company\/host-mayo"]},{"@type":"Person","@id":"https:\/\/hostmayo.com\/blog\/#\/schema\/person\/a511fa95af50c3cb2614311b73c2ea9d","name":"Billa","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hostmayo.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/55380a32a6c37aba9b35b3d51dbd6cd6460322a433ecdaaacb28aece47163e51?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/55380a32a6c37aba9b35b3d51dbd6cd6460322a433ecdaaacb28aece47163e51?s=96&d=mm&r=g","caption":"Billa"},"description":"Geek, Banker &amp; Entrepreneur.","sameAs":["https:\/\/hostmayo.com\/"],"url":"https:\/\/hostmayo.com\/blog\/author\/waqass\/"}]}},"jetpack_featured_media_url":"https:\/\/hostmayo.com\/blog\/wp-content\/uploads\/2016\/06\/csf_large.png","_links":{"self":[{"href":"https:\/\/hostmayo.com\/blog\/wp-json\/wp\/v2\/posts\/172","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hostmayo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hostmayo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hostmayo.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hostmayo.com\/blog\/wp-json\/wp\/v2\/comments?post=172"}],"version-history":[{"count":0,"href":"https:\/\/hostmayo.com\/blog\/wp-json\/wp\/v2\/posts\/172\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hostmayo.com\/blog\/wp-json\/wp\/v2\/media\/173"}],"wp:attachment":[{"href":"https:\/\/hostmayo.com\/blog\/wp-json\/wp\/v2\/media?parent=172"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hostmayo.com\/blog\/wp-json\/wp\/v2\/categories?post=172"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hostmayo.com\/blog\/wp-json\/wp\/v2\/tags?post=172"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}