{"id":18418,"date":"2026-09-29T23:51:12","date_gmt":"2026-09-29T20:51:12","guid":{"rendered":"https:\/\/www.hyyat.com\/knowledgebase\/csf-firewall-whm\/"},"modified":"2026-11-22T18:52:48","modified_gmt":"2026-11-22T15:52:48","password":"","slug":"csf-firewall-whm","status":"publish","type":"docs","link":"https:\/\/www.hyyat.com\/en\/knowledgebase\/csf-firewall-whm\/","title":{"rendered":"The CSF Firewall on a cPanel Server: What It Does, Installing It from Manage Plugins, and the First Settings"},"content":{"rendered":"<div class=\"hkb\" dir=\"ltr\">\n<div class=\"hkb-tldr\"><b>Short answer<\/b>CSF is a firewall for Linux servers, and its <b>lfd<\/b> service watches for failed logins and blocks their source. On a cPanel server it is now installed from <b>WHM, then cPanel, then Manage Plugins<\/b> as \u201cConfigServer Security &amp; Firewall for cPanel\u201d. After installing, whitelist your own IP, review the ports, then turn testing mode off.<\/div>\n<div class=\"hy-vid\"><div style=\"width: 1280px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-18418-1\" width=\"1280\" height=\"720\" poster=\"https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/hyyat-srv-csf-en.jpg\" preload=\"none\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/hyyat-srv-csf-en.mp4?_=1\" \/><a href=\"https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/hyyat-srv-csf-en.mp4\">https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/hyyat-srv-csf-en.mp4<\/a><\/video><\/div><\/div>\n<p>A server on the internet gets knocked on all day: SSH logins with guessed passwords, scans for open ports, requests from addresses with a bad reputation. CSF is the doorman that decides what gets in. It is one of the most widely used firewalls with cPanel because it understands cPanel\u2019s services and adds its own management page to WHM.<\/p>\n<h2>What CSF is made of<\/h2>\n<div class=\"hkb-tbl\">\n<table>\n<thead>\n<tr>\n<th>Part<\/th>\n<th>What it does<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><b>csf<\/b><\/td>\n<td>The firewall itself: opens allowed ports, closes the rest and applies allow and deny lists<\/td>\n<\/tr>\n<tr>\n<td><b>lfd<\/b> (Login Failure Daemon)<\/td>\n<td>Reads login logs continuously and blocks an address that keeps failing, temporarily or permanently<\/td>\n<\/tr>\n<tr>\n<td><b>The WHM page<\/b><\/td>\n<td>Manages settings and lists inside WHM without SSH<\/td>\n<\/tr>\n<tr>\n<td><b>Configuration files<\/b><\/td>\n<td>Chiefly <code>\/etc\/csf\/csf.conf<\/code> for settings, plus <code>csf.allow<\/code> and <code>csf.deny<\/code> for the lists<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2>A note about ConfigServer<\/h2>\n<p>The original developer, ConfigServer, has shut down, but cPanel now provides CSF as a plugin in WHM\u2019s Manage Plugins, where it is installed and updated. ConfigServer\u2019s other tools, such as Explorer and ConfigServer Mail Manage, are no longer available; alternatives to Explorer are in <a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/configserver-explorer-alternatives-whm\/\">browsing server files<\/a>.<\/p>\n<h2>Installing from WHM<\/h2>\n<p class=\"hkb-path\"><code>WHM \u203a cPanel \u203a Manage Plugins<\/code><\/p>\n<figure class=\"hkb-fig\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.hyyat.com\/zasogooh\/2026\/11\/hkb-sv-w-plugins.webp\" alt=\"The ConfigServer Security &amp; Firewall for cPanel plugin in WHM Manage Plugins\" width=\"800\" height=\"457\" loading=\"lazy\" \/><\/figure>\n<ol class=\"hkb-steps\">\n<li><b>Open Manage Plugins<\/b> under cPanel in the sidebar, or search for Plugins.<\/li>\n<li><b>Find the card<\/b> \u201cConfigServer Security &amp; Firewall for cPanel\u201d, with its version underneath.<\/li>\n<li><b>Click Install<\/b> WHM waits for the install to finish and shows the result.<\/li>\n<li><b>Open the firewall<\/b> it appears under <b>Plugins<\/b> in WHM as ConfigServer Security &amp; Firewall.<\/li>\n<\/ol>\n<p>If the server already has an older CSF installed by hand from ConfigServer\u2019s site, do not install it twice. Check its version at the top of its WHM page, and if you need to move to the current build, copy <code>\/etc\/csf<\/code> first.<\/p>\n<h2>The first five things after installing<\/h2>\n<div class=\"hkb-tbl\">\n<table>\n<thead>\n<tr>\n<th>Order<\/th>\n<th>What to do<\/th>\n<th>Why<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>1<\/td>\n<td>Add your fixed IP under <b>Quick Allow<\/b><\/td>\n<td>So lfd does not block you after a mistyped password<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>Review <b>TCP_IN<\/b> and <b>TCP_OUT<\/b> in Firewall Configuration<\/td>\n<td>Make sure cPanel, mail and any service you use are open; see <a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/open-port-csf-firewall-whm\/\">opening a port in CSF<\/a><\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>Run <b>Check Server Security<\/b><\/td>\n<td>Lists known weak points in the server\u2019s setup<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>Set <b>TESTING = 0<\/b><\/td>\n<td>In testing mode the rules are flushed every 5 minutes, so there is no real protection<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>Set the alert address <b>LF_ALERT_TO<\/b><\/td>\n<td>So you are told when an address is blocked or root logs in<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<div class=\"hkb-note warn\">Testing mode exists so you do not lock yourself out while first configuring. Only turn it off once you have confirmed you can still reach SSH and WHM after restarting CSF.<\/div>\n<h2>CSF and cPHulk together?<\/h2>\n<p>Yes, they work side by side. cPHulk protects the cPanel, WHM and mail logins; lfd in CSF watches a wider set of logs, including SSH and FTP. If a customer cannot reach the server, check both: <a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/cphulk-whitelist-blacklist-ip\/\">cPHulk<\/a> and the <code>csf -g<\/code> command in <a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/important-csf-firewall-commands-via-ssh\/\">CSF commands<\/a>.<\/p>\n<h2>Three things to remember<\/h2>\n<ul class=\"hkb-list\">\n<li>CSF is installed today from WHM through Manage Plugins, not by downloading from ConfigServer\u2019s site.<\/li>\n<li>First step, always: your IP on the whitelist, then the ports, then testing mode off.<\/li>\n<li>Warnings after installation, such as RESTRICT_SYSLOG, have simple fixes in their own guides.<\/li>\n<\/ul>\n<h2>What server owners ask us<\/h2>\n<div class=\"hkb-faq\">\n<details>\n<summary>Is CSF free?<\/summary>\n<p>Yes. It installs as a plugin from Manage Plugins at no extra cost.<\/p>\n<\/details>\n<details>\n<summary>Do I need CSF if my provider has an external firewall?<\/summary>\n<p>An external firewall protects ports, but lfd adds automatic blocking of password guessers, which external firewalls do not usually do.<\/p>\n<\/details>\n<details>\n<summary>What if CSF blocks me?<\/summary>\n<p>Log in through the server console in your provider\u2019s panel and run <code>csf -dr your-ip<\/code>, then <code>csf -a your-ip<\/code>.<\/p>\n<\/details>\n<details>\n<summary>Does CSF slow the server down?<\/summary>\n<p>Its overhead is normally light. Very large block lists can add load, so do not block huge ranges without need.<\/p>\n<\/details>\n<\/div>\n<div class=\"hkb-rel\"><b>Related guides<\/b><\/p>\n<ul>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/open-port-csf-firewall-whm\/\">How to Open a Port in the CSF Firewall from WHM<\/a><\/li>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/important-csf-firewall-commands-via-ssh\/\">Important CSF firewall commands via SSH<\/a><\/li>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/fix-restrict-syslog-csf-warning\/\">How to Fix &#8220;RESTRICT_SYSLOG is disabled&#8221; in CSF<\/a><\/li>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/cphulk-whitelist-blacklist-ip\/\">cPHulk in WHM: Unblocking an IP, Whitelisting and Blacklisting, and Tuning Brute Force Protection<\/a><\/li>\n<li><a href=\"https:\/\/www.hyyat.com\/en\/knowledgebase\/5-tips-to-secure-your-cpanel-server\/\">5 Tips to Secure Your cPanel Server<\/a><\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.hyyat.com\/en\/kb\/whm-cpanel-control-panels\/\">All WHM guides \u2192<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Short answerCSF is a firewall for Linux servers, and its lfd service watches for failed logins and blocks their source. On a cPanel server it is now installed from WHM, then cPanel, then Manage Plugins as \u201cConfigServer Security &amp; Firewall for cPanel\u201d. After installing, whitelist your own IP, review the ports, then turn testing mode [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":21225,"comment_status":"open","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"_templately_pack_id":"","_templately_imported_at":"","_templately_source":"","_templately_import_session_id":"","footnotes":""},"doc_category":[2734],"doc_tag":[],"class_list":["post-18418","docs","type-docs","status-publish","has-post-thumbnail","hentry","doc_category-whm-cpanel-control-panels"],"year_month":"2026-11","word_count":727,"total_views":"5","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"ahmed fathy","author_nicename":"ahmed-fathy","author_url":"https:\/\/www.hyyat.com\/en\/author\/ahmed-fathy\/"},"doc_category_info":[{"term_name":"WHM\/cPanel","term_url":"https:\/\/www.hyyat.com\/en\/kb\/whm-cpanel-control-panels\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs\/18418","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/comments?post=18418"}],"version-history":[{"count":0,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/docs\/18418\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/media\/21225"}],"wp:attachment":[{"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/media?parent=18418"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/doc_category?post=18418"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.hyyat.com\/en\/wp-json\/wp\/v2\/doc_tag?post=18418"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}