{"id":29766,"date":"2019-02-25T15:27:06","date_gmt":"2019-02-25T21:27:06","guid":{"rendered":"https:\/\/www.rosehosting.com\/blog\/?p=29766"},"modified":"2022-12-13T04:33:24","modified_gmt":"2022-12-13T10:33:24","slug":"how-to-install-the-csf-firewall-on-centos-7","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/","title":{"rendered":"How to Install the CSF Firewall on CentOS 7"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div><p><img decoding=\"async\" class=\"size-full wp-image-29776 alignnone\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-csf-centos7.jpg\" alt=\"Install CSF on CentOS 7\" width=\"742\" height=\"372\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-csf-centos7.jpg 742w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-csf-centos7-150x75.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-csf-centos7-300x150.jpg 300w\" sizes=\"(max-width: 742px) 100vw, 742px\" \/><\/p>\n<p>One of the first things you should do after installing CentOS 7 is\u00a0to configure a decent firewall. The normal firewall that comes preinstalled on CentOS is called iptables &#8211; and even though that is a very thorough solution, it&#8217;s usually targeted towards more experienced users, and because of its steeper learning curve, it can feel unintuitive to get started with. This is why we recommend a 3rd party solution called ConfigServer Security &amp; Firewall (CSF). It&#8217;s free, open-source, and is one of the best ways to manage your firewall needs on CentOS.<\/p>\n<p><!--more--><\/p>\n<p>In this tutorial, we will go in-depth on how to install, configure, and block ports using CSF. This tutorial focuses on installing CSF on a <a href=\"https:\/\/www.rosehosting.com\/centos-hosting.html\">CentOS 7 VPS<\/a>.<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_1 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-69c3c307a872d\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"ez-toc-cssicon\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-69c3c307a872d\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/#Step-1-Checking-for-Pre-Requisites\" >Step 1: Checking for Pre-Requisites<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/#Step-2-Downloading-Extracting-and-Installing-CSF\" >Step 2: Downloading, Extracting and Installing CSF<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/#Step-3-Ensuring-that-you-Dont-Lock-Yourself-Out\" >Step 3: Ensuring that you Don&#8217;t Lock Yourself Out<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/#Step-4-Enabling-CSF\" >Step 4: Enabling CSF<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/#Step-5-Verifying-That-the-Port-is-OpenClosed\" >Step 5: Verifying That the Port is Open\/Closed<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"Step-1-Checking-for-Pre-Requisites\"><\/span>Step 1: Checking for Pre-Requisites<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The CSF package relies on Perl for some of its functionality. So first we need to make sure that Perl is installed by running the following command:<\/p>\n<pre>yum list installed perl<\/pre>\n<p>You should see something like this if Perl is installed:<\/p>\n<figure id=\"attachment_29767\" aria-describedby=\"caption-attachment-29767\" style=\"width: 591px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-29767 size-full\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Perl-is-Installed.jpg\" alt=\"\" width=\"601\" height=\"226\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Perl-is-Installed.jpg 601w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Perl-is-Installed-150x56.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Perl-is-Installed-300x113.jpg 300w\" sizes=\"(max-width: 601px) 100vw, 601px\" \/><figcaption id=\"caption-attachment-29767\" class=\"wp-caption-text\">Perl is Installed<\/figcaption><\/figure>\n<p>If it&#8217;s not installed, then you can install it by typing:<\/p>\n<pre>sudo yum install perl<\/pre>\n<p>And you&#8217;re done. Now we can proceed with the CSF installation.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step-2-Downloading-Extracting-and-Installing-CSF\"><\/span>Step 2: Downloading, Extracting and Installing CSF<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You can use our command below to directly download and extract the latest version of CFS using their current direct download link. If the link changes, visit CFS&#8217; webpage for the latest download link for CSF. You should find it here, like this:<\/p>\n<figure id=\"attachment_29768\" aria-describedby=\"caption-attachment-29768\" style=\"width: 590px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-29768 size-full\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Download-CSF-Firewall.jpg\" alt=\"\" width=\"600\" height=\"265\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Download-CSF-Firewall.jpg 600w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Download-CSF-Firewall-150x66.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Download-CSF-Firewall-300x133.jpg 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><figcaption id=\"caption-attachment-29768\" class=\"wp-caption-text\">Webpage for Download Link<\/figcaption><\/figure>\n<p>Copy the link. Now, we can download and extract it all at the same time, like this:<\/p>\n<pre>wget -qO- https:\/\/download.configserver.com\/csf.tgz | tar xvz<\/pre>\n<p>This creates a new folder called &#8220;csf&#8221;. Navigate into it:<\/p>\n<pre>cd csf<\/pre>\n<p>And install the package:<\/p>\n<pre>sudo sh install.sh<\/pre>\n<p>The installation should complete quickly. Now we can activate the script which tells us that CSF is ready to install. It&#8217;ll check our system setup and tell us if everything is in order:<\/p>\n<pre>perl \/usr\/local\/csf\/bin\/csftest.pl<\/pre>\n<p>If all goes well, you should get an output like this:<\/p>\n<figure id=\"attachment_29769\" aria-describedby=\"caption-attachment-29769\" style=\"width: 661px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-29769 size-full\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/CSF-Functioning-Properly.jpg\" alt=\"\" width=\"671\" height=\"333\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/CSF-Functioning-Properly.jpg 671w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/CSF-Functioning-Properly-150x74.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/CSF-Functioning-Properly-300x149.jpg 300w\" sizes=\"(max-width: 671px) 100vw, 671px\" \/><figcaption id=\"caption-attachment-29769\" class=\"wp-caption-text\">CSF Can be Installed<\/figcaption><\/figure>\n<p>This means that CSF is ready to run on your system.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step-3-Ensuring-that-you-Dont-Lock-Yourself-Out\"><\/span>Step 3: Ensuring that you Don&#8217;t Lock Yourself Out<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>First things first &#8211; before activating any firewall solution, you need to make sure of two things:<\/p>\n<ol>\n<li>Your SSH port is open<\/li>\n<li>Your IP address is whitelisted<\/li>\n<\/ol>\n<p><strong>Note:<\/strong> Without these two key factors, you risk getting locked out of your own server! CSF is smart enough to auto-whitelist both. Even if you use a custom SSH port, CSF will add it to its list of whitelisted ports. However, even with this additional protection, it&#8217;s always a good idea to verify this.<\/p>\n<p>To do this, open the CSF configuration file \/etc\/csf\/csf.conf in your preferred text editor. For example:<\/p>\n<pre>nano \/etc\/csf\/csf.conf<\/pre>\n<p>Now scroll down to the line called &#8220;TCP_IN&#8221;. This is a comma-separated list of ports to which access is allowed. Most of the common ones are already whitelisted such as those for HTTP and HTTPS. However, note that the last port is &#8220;7022&#8221;:<\/p>\n<figure id=\"attachment_29770\" aria-describedby=\"caption-attachment-29770\" style=\"width: 605px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-29770 size-full\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Check-if-SSH-Port-Open.jpg\" alt=\"\" width=\"615\" height=\"228\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Check-if-SSH-Port-Open.jpg 615w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Check-if-SSH-Port-Open-150x56.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Check-if-SSH-Port-Open-300x111.jpg 300w\" sizes=\"(max-width: 615px) 100vw, 615px\" \/><figcaption id=\"caption-attachment-29770\" class=\"wp-caption-text\">Port Successfully Added Automatically<\/figcaption><\/figure>\n<p>&#8220;7022&#8221; is the custom SSH port set up on this server. So, CSF has done its job and automatically added it to the list of allowed ports.<\/p>\n<p>CSF also includes a login daemon that watches out for repeated attempts to infiltrate your server. The service is called <code>lfd<\/code>, and we should enable it by setting the &#8220;TESTING&#8221; variable to &#8220;0&#8221; in the CSF config file, like this:<\/p>\n<figure id=\"attachment_29771\" aria-describedby=\"caption-attachment-29771\" style=\"width: 593px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-29771 size-full\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Disable-Testing-on-CSF.jpg\" alt=\"\" width=\"603\" height=\"330\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Disable-Testing-on-CSF.jpg 603w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Disable-Testing-on-CSF-150x82.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Disable-Testing-on-CSF-300x164.jpg 300w\" sizes=\"(max-width: 603px) 100vw, 603px\" \/><figcaption id=\"caption-attachment-29771\" class=\"wp-caption-text\">Disable &#8220;TESTING&#8221;<\/figcaption><\/figure>\n<p>Save your changes, and CSF is now configured and ready to run.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step-4-Enabling-CSF\"><\/span>Step 4: Enabling CSF<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To start CSF and allow it to work its magic, we need to use the following command:<\/p>\n<pre>systemctl start csf<\/pre>\n<p>And we can test the status like this:<\/p>\n<pre>systemctl status csf<\/pre>\n<p>Which gives us the following output:<\/p>\n<figure id=\"attachment_29772\" aria-describedby=\"caption-attachment-29772\" style=\"width: 619px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"wp-image-29772 size-full\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/CSF-Active.jpg\" alt=\"\" width=\"629\" height=\"320\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/CSF-Active.jpg 629w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/CSF-Active-150x76.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/CSF-Active-300x153.jpg 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/CSF-Active-627x320.jpg 627w\" sizes=\"(max-width: 629px) 100vw, 629px\" \/><figcaption id=\"caption-attachment-29772\" class=\"wp-caption-text\">CSF is Active<\/figcaption><\/figure>\n<p>Now, let&#8217;s verify it.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Step-5-Verifying-That-the-Port-is-OpenClosed\"><\/span>Step 5: Verifying That the Port is Open\/Closed<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>The latest version of Windows comes with PowerShell. You can use it to test whether a port is open on a remote host. So let&#8217;s say we want to verify port number 7022 (SSH on this server), we can do so like this:<\/p>\n<pre>Test-NetConnection -ComputerName 206.196.115.159 -Port 7022<\/pre>\n<p>(Remember to replace the IP address with the one that your server is assigned with)<\/p>\n<p>This command should end with a &#8220;success&#8221; or a &#8220;failure&#8221; message like this:<\/p>\n<figure id=\"attachment_29774\" aria-describedby=\"caption-attachment-29774\" style=\"width: 650px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" class=\"size-full wp-image-29774\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Port-Open-test-After-CSF.jpg\" alt=\"\" width=\"660\" height=\"221\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Port-Open-test-After-CSF.jpg 660w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Port-Open-test-After-CSF-150x50.jpg 150w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/Port-Open-test-After-CSF-300x100.jpg 300w\" sizes=\"(max-width: 660px) 100vw, 660px\" \/><figcaption id=\"caption-attachment-29774\" class=\"wp-caption-text\">Port Open Test After CSF is Set Up<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>You can use this to verify whether CSF is working as it should. Check a few of the ports, and add some new ones to the &#8220;TCP_IN&#8221; variable in the CSF config file to see if everything is functioning as it should.<\/p>\n<p>If it is, then congratulations! You have successfully set up CSF on your CentOS VPS.<\/p>\n<hr \/>\n<p>Of course, if you are one of our\u00a0<a href=\"https:\/\/www.rosehosting.com\/centos-hosting.html\">CentOS Hosting<\/a>\u00a0customers, you don\u2019t have to install CSF on your CentOS 7 VPS &#8211; simply ask our admins, sit back and relax. Our admins will install CSF on CentOS 7 for you immediately.<\/p>\n<p><span style=\"color: #ff0000;\">PS.<\/span> If you liked this post on how to install CSF on a CentOS 7 VPS, please share it with your friends on the social networks using the buttons below, or simply leave a comment in the comments section. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the first things you should do after installing CentOS 7 is\u00a0to configure a decent firewall. The normal firewall &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"How to Install the CSF Firewall on CentOS 7\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/#more-29766\" aria-label=\"Read more about How to Install the CSF Firewall on CentOS 7\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":29776,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1699,1703,13],"tags":[34,1783,22],"class_list":["post-29766","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-security","category-tutorials","tag-centos","tag-csf","tag-linux-security","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to Install the CSF Firewall on CentOS 7 | RoseHosting<\/title>\n<meta name=\"description\" content=\"How to Install the CSF Firewall on CentOS 7 | RoseHosting\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install the CSF Firewall on CentOS 7\" \/>\n<meta property=\"og:description\" content=\"How to Install the CSF Firewall on CentOS 7 | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2019-02-25T21:27:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-13T10:33:24+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-csf-centos7.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"742\" \/>\n\t<meta property=\"og:image:height\" content=\"372\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"How to Install the CSF Firewall on CentOS 7\",\"datePublished\":\"2019-02-25T21:27:06+00:00\",\"dateModified\":\"2022-12-13T10:33:24+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/\"},\"wordCount\":893,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-csf-centos7.jpg\",\"keywords\":[\"centos\",\"csf\",\"linux security\"],\"articleSection\":[\"CentOS\",\"Security\",\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/\",\"name\":\"How to Install the CSF Firewall on CentOS 7 | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-csf-centos7.jpg\",\"datePublished\":\"2019-02-25T21:27:06+00:00\",\"dateModified\":\"2022-12-13T10:33:24+00:00\",\"description\":\"How to Install the CSF Firewall on CentOS 7 | RoseHosting\",\"breadcrumb\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/#primaryimage\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-csf-centos7.jpg\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-csf-centos7.jpg\",\"width\":742,\"height\":372,\"caption\":\"Install CSF on CentOS 7\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.rosehosting.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Install the CSF Firewall on CentOS 7\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/RoseHosting\",\"https:\/\/x.com\/rosehosting\",\"https:\/\/www.linkedin.com\/in\/rosehosting\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\/\/www.rosehosting.com\",\"https:\/\/www.facebook.com\/rosehosting.helpdesk\"],\"url\":\"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Install the CSF Firewall on CentOS 7 | RoseHosting","description":"How to Install the CSF Firewall on CentOS 7 | RoseHosting","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:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/","og_locale":"en_US","og_type":"article","og_title":"How to Install the CSF Firewall on CentOS 7","og_description":"How to Install the CSF Firewall on CentOS 7 | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2019-02-25T21:27:06+00:00","article_modified_time":"2022-12-13T10:33:24+00:00","og_image":[{"width":742,"height":372,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-csf-centos7.jpg","type":"image\/jpeg"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"How to Install the CSF Firewall on CentOS 7","datePublished":"2019-02-25T21:27:06+00:00","dateModified":"2022-12-13T10:33:24+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/"},"wordCount":893,"commentCount":0,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-csf-centos7.jpg","keywords":["centos","csf","linux security"],"articleSection":["CentOS","Security","Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/","url":"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/","name":"How to Install the CSF Firewall on CentOS 7 | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-csf-centos7.jpg","datePublished":"2019-02-25T21:27:06+00:00","dateModified":"2022-12-13T10:33:24+00:00","description":"How to Install the CSF Firewall on CentOS 7 | RoseHosting","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-csf-centos7.jpg","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2019\/02\/install-csf-centos7.jpg","width":742,"height":372,"caption":"Install CSF on CentOS 7"},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/how-to-install-the-csf-firewall-on-centos-7\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Install the CSF Firewall on CentOS 7"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/29766","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=29766"}],"version-history":[{"count":3,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/29766\/revisions"}],"predecessor-version":[{"id":44207,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/29766\/revisions\/44207"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/29776"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=29766"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=29766"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=29766"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}