{"id":49,"date":"2020-01-22T22:49:22","date_gmt":"2020-01-22T22:49:22","guid":{"rendered":"https:\/\/serverhub.com\/kb\/?p=49"},"modified":"2020-01-22T22:52:38","modified_gmt":"2020-01-22T22:52:38","slug":"how-to-install-csf-config-server-firewall-on-centos-8","status":"publish","type":"post","link":"https:\/\/serverhub.com\/kb\/how-to-install-csf-config-server-firewall-on-centos-8\/","title":{"rendered":"How to install CSF (Config Server Firewall) on CentOS 8"},"content":{"rendered":"\n<p> ConfigServer&nbsp;<strong>Firewall<\/strong>, also known as&nbsp;<strong>CSF<\/strong>, is a&nbsp;<strong>firewall<\/strong>&nbsp;configuration script created to provide better security for your server while giving you an advanced, easy to use interface for managing&nbsp;<strong>firewall<\/strong> settings. ConfigServer <strong>Firewall<\/strong>&nbsp;also comes with a service called Login Failure Daemon, or LFD <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites <\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>CentOS 8 (CentOS 7 will also work).<\/li><li>root privileges to your CentOS Server<\/li><\/ul>\n\n\n\n<p><strong>What we will do in this tutorial:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Install the dependencies for CSF.<\/li><li>Install CSF.<\/li><li>Configure CSF.<\/li><li>Basic CSF commands.<\/li><li>Advanced Configuration.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Installation of dependencies<\/h2>\n\n\n\n<p>Since CSF is based on perl, you will need to make sure that you have the right dependencies to ensure your installation is flawless.  <br><\/p>\n\n\n\n<p>You need&nbsp;<em>wget<\/em>&nbsp;to download the CSF installer and&nbsp;<em>vim<\/em>&nbsp;(or an editor of your choice) for editing the CSF configuration file. Install the packages with the yum command: <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Time to Install<\/h2>\n\n\n\n<p>To start go to the <strong>&#8220;\/usr\/src\/&#8221;<\/strong> directory and download CSF with wget command. You can do it by following this command. <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/usr\/src\/wget https:\/\/download.configserver.com\/csf.tgz<\/code><\/pre>\n\n\n\n<p>Extract the tar.gz file and go to the csf directory, then install it:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>tar -xzf csf.tgzcd csfsh install.sh<\/code><\/pre>\n\n\n\n<p>You should get the information that CSF installation is completed at the end.<\/p>\n\n\n\n<p>Now you should check that CSG really works on this server. Go to the&nbsp;<em>&#8220;\/usr\/local\/csf\/bin\/&#8221;<\/em>&nbsp;directory, and run&nbsp;<em>&#8220;csftest.pl&#8221;<\/em>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/usr\/local\/csf\/bin\/perl csftest.pl<\/code><\/pre>\n\n\n\n<p>If you see the test results as shown below, then CSF is running without problems on your server:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>RESULT: csf should function on this server<\/code><\/pre>\n\n\n\n<p>You did it! You&#8217;ve now installed CSF on your server and are ready to start configuring CSF, which we will cover in another article. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>ConfigServer&nbsp;Firewall, also known as&nbsp;CSF, is a&nbsp;firewall&nbsp;configuration script created to provide better security for your server while giving you an advanced, easy to use interface for managing&nbsp;firewall settings. ConfigServer Firewall&nbsp;also comes with a service called Login Failure Daemon, or LFD Prerequisites CentOS 8 (CentOS 7 will also work). root privileges to your CentOS Server What we &#8230; <a title=\"How to install CSF (Config Server Firewall) on CentOS 8\" class=\"read-more\" href=\"https:\/\/serverhub.com\/kb\/how-to-install-csf-config-server-firewall-on-centos-8\/\" aria-label=\"More on How to install CSF (Config Server Firewall) on CentOS 8\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"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,"om_disable_all_campaigns":false,"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[7],"tags":[22,10],"class_list":["post-49","post","type-post","status-publish","format-standard","hentry","category-linux-administration","tag-csf-firewall","tag-linux-administration"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/posts\/49","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/comments?post=49"}],"version-history":[{"count":0,"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/posts\/49\/revisions"}],"wp:attachment":[{"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/media?parent=49"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/categories?post=49"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/serverhub.com\/kb\/wp-json\/wp\/v2\/tags?post=49"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}