{"id":778,"date":"2024-11-13T10:38:06","date_gmt":"2024-11-13T10:38:06","guid":{"rendered":"https:\/\/webhostingdelhi.net.in\/tutorials\/?p=778"},"modified":"2024-11-13T10:38:25","modified_gmt":"2024-11-13T10:38:25","slug":"whitelist-ip-address-in-csf","status":"publish","type":"post","link":"https:\/\/webhostingdelhi.net.in\/tutorials\/whitelist-ip-address-in-csf\/","title":{"rendered":"How to Whitelist IP address in CSF from WHM ?"},"content":{"rendered":"\n<p>Whitelist IP address in <a href=\"https:\/\/configserver.com\/configserver-security-and-firewall\/\" rel=\"nofollow noopener\" target=\"_blank\">CSF <\/a>from <a href=\"https:\/\/docs.cpanel.net\/whm\/\" rel=\"nofollow noopener\" target=\"_blank\">WHM<\/a>, ConfigServer Security &amp; Firewall (CSF) is a firewall management tool for Linux servers, commonly used with Web Host Manager (WHM). If you&#8217;re managing a server via WHM, you might need to whitelist an IP address in CSF to ensure it isn&#8217;t blocked by the firewall. Here\u2019s a detailed guide on how to whitelist an IP address using CSF in WHM.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#step-1-log-in-to-whm\">Step 1: Log in to WHM<\/a><\/li><li><a href=\"#step-2-locate-the-csf-plugin\">Step 2: Locate the CSF Plugin<\/a><\/li><li><a href=\"#step-3-open-the-quick-allow-option\">Step 3: Whitelist IP address in CSF from WHM<\/a><\/li><li><a href=\"#step-4-enter-the-ip-address-to-whitelist\">Step 4: Enter the IP Address to Whitelist<\/a><\/li><li><a href=\"#step-5-add-the-ip-address\">Step 5: Add the IP Address<\/a><\/li><li><a href=\"#step-6-verify-the-ip-address-is-whitelisted\">Step 6: Verify the IP Address is Whitelisted<\/a><\/li><li><a href=\"#additional-tips-for-managing-whitelisted-i-ps\">Additional Tips for Managing Whitelisted IPs<\/a><\/li><li><a href=\"#step-7-restart-csf-and-lfd-optional-but-recommended\">Step 7: Restart CSF and LFD (Optional but Recommended)<\/a><\/li><li><a href=\"#troubleshooting-tips\">Troubleshooting Tips<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-1-log-in-to-whm\">Step 1: Log in to WHM<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open your WHM login page by navigating to <code>https:\/\/your-server-ip:2087<\/code> in your web browser.<\/li>\n\n\n\n<li>Enter your administrator username and password to access WHM.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"840\" height=\"445\" src=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/06\/image-9.png\" alt=\"\" class=\"wp-image-500\" srcset=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/06\/image-9.png 840w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/06\/image-9-300x159.png 300w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/06\/image-9-768x407.png 768w\" sizes=\"auto, (max-width: 840px) 100vw, 840px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-2-locate-the-csf-plugin\">Step 2: Locate the CSF Plugin<\/h3>\n\n\n\n<p>Once inside WHM, search for &#8220;ConfigServer Security &amp; Firewall&#8221; in the search bar on the left side of the dashboard. This should bring up the CSF plugin. Click on it to open the CSF interface.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"232\" height=\"209\" src=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/Snag_1108c76.png\" alt=\"\" class=\"wp-image-779\"\/><\/figure>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>Note:<\/strong> If you don\u2019t see ConfigServer Security &amp; Firewall in WHM, you may need to install it manually or contact your <a href=\"https:\/\/www.webhostingdelhi.net.in\/web-hosting-delhi\/\">hosting provider<\/a>.<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-3-open-the-quick-allow-option\">Step 3: Whitelist IP address in CSF from WHM<\/h3>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"713\" height=\"235\" src=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/Snag_110f0cd.png\" alt=\"\" class=\"wp-image-780\" srcset=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/Snag_110f0cd.png 713w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/Snag_110f0cd-300x99.png 300w\" sizes=\"auto, (max-width: 713px) 100vw, 713px\" \/><\/figure>\n\n\n\n<p>Within the CSF dashboard, you\u2019ll find a range of options and configurations for managing the firewall. To Whitelist IP address in CSF, look for the &#8220;Quick Allow&#8221; option. This feature is specifically for adding IP addresses to the whitelist.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"826\" height=\"408\" src=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/Snag_111613a.png\" alt=\"Whitelist IP address in CSF from WHM\" class=\"wp-image-781\" srcset=\"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/Snag_111613a.png 826w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/Snag_111613a-300x148.png 300w, https:\/\/webhostingdelhi.net.in\/tutorials\/wp-content\/uploads\/2024\/11\/Snag_111613a-768x379.png 768w\" sizes=\"auto, (max-width: 826px) 100vw, 826px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-4-enter-the-ip-address-to-whitelist\">Step 4: Enter the IP Address to Whitelist<\/h3>\n\n\n\n<p>In the &#8220;Quick Allow&#8221; field, you want to enter the Whitelist IP address in CSF. Here\u2019s what you should keep in mind:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Make sure the IP address is entered correctly. A small typo can result in the wrong IP being allowed.<\/li>\n\n\n\n<li>You can also add comments to identify why the IP was added. For instance, if you\u2019re allowing an IP address for a specific developer, you could add a comment like <code>developer-access<\/code>.<\/li>\n<\/ul>\n\n\n\n<p>The format for entering the IP address is as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>IP_ADDRESS # comment<\/code><\/pre>\n\n\n\n<p>For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>192.168.1.1 # developer-access<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-5-add-the-ip-address\">Step 5: Add the IP Address<\/h3>\n\n\n\n<p>Click the &#8220;Quick Allow&#8221; button to Whitelist IP address in CSF will now process the entry and update the firewall rules to allow this IP. Once done, you should see a confirmation message indicating that the IP has been added successfully.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-6-verify-the-ip-address-is-whitelisted\">Step 6: Verify the IP Address is Whitelisted<\/h3>\n\n\n\n<p>To ensure the IP address has been correctly added to the whitelist, navigate to the \u201ccsf.allow\u201d file. You can do this directly within WHM by going to:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>CSF interface in WHM<\/li>\n\n\n\n<li>\u201cAllow IPs\u201d or view the file itself by clicking &#8220;Edit&#8221; next to <code>csf.allow<\/code>.<\/li>\n<\/ol>\n\n\n\n<p>Within the <code>csf.allow<\/code> file, you should see your IP address along with any comments you added, confirming that it\u2019s whitelisted.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"additional-tips-for-managing-whitelisted-i-ps\">Additional Tips for Managing Whitelisted IPs<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Use CIDR Notation for IP Ranges<\/strong>: If you need to allow a range of IP addresses, use CIDR notation. For example, <code>192.168.1.0\/24<\/code> will whitelist all IPs from <code>192.168.1.1<\/code> to <code>192.168.1.255<\/code>.<\/li>\n\n\n\n<li><strong>Check Existing Rules<\/strong>: If the IP you\u2019re trying to whitelist is blocked, review both <code>csf.deny<\/code> and <code>csf.allow<\/code> files. If it\u2019s listed in <code>csf.deny<\/code>, it might still be blocked, even if added to the allow list. Remove the IP from <code>csf.deny<\/code> before adding it to <code>csf.allow<\/code>.<\/li>\n\n\n\n<li><strong>Use WHM for Management<\/strong>: Though you can manually edit <code>csf.allow<\/code> and <code>csf.deny<\/code> files from the command line, WHM simplifies this by providing a graphical interface.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-7-restart-csf-and-lfd-optional-but-recommended\">Step 7: Restart CSF and LFD (Optional but Recommended)<\/h3>\n\n\n\n<p>After making changes to the firewall rules, it\u2019s often a good idea to restart both CSF and LFD (Login Failure Daemon) to ensure the new settings take effect.<\/p>\n\n\n\n<p>To do this:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go back to the main CSF dashboard in WHM.<\/li>\n\n\n\n<li>Click on the &#8220;Firewall Restart&#8221; button.<\/li>\n\n\n\n<li>Restarting ensures that any new rules are active and that all changes are fully applied.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"troubleshooting-tips\">Troubleshooting Tips<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>IP Still Blocked After Whitelisting<\/strong>: If the IP is still blocked, make sure it\u2019s not listed in <code>csf.deny<\/code>. Also, check if the IP might be part of a larger blocked IP range.<\/li>\n\n\n\n<li><strong>Review Logs<\/strong>: The CSF logs (<code>\/var\/log\/lfd.log<\/code>) can provide insights into why an IP was blocked or if there were any issues processing the whitelist IP address in CSF .<\/li>\n\n\n\n<li><strong>Ensure Proper Syntax<\/strong>: When editing manually, always double-check your syntax. Any incorrect entries may prevent CSF from processing correctly.<\/li>\n<\/ul>\n\n\n\n<p>By following these steps, you\u2019ll be able to successfully whitelist IP address in CSF  using WHM. This can be essential for allowing trusted users or services to access your server without interruption.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Whitelist IP address in CSF from WHM, ConfigServer Security &amp; Firewall (CSF) is a firewall management tool for Linux servers, commonly used with Web Host Manager (WHM). If you&#8217;re managing a server via WHM, you might need to whitelist an IP address in CSF to ensure it isn&#8217;t blocked by the firewall. Here\u2019s a detailed [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":784,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[70],"tags":[74],"class_list":["post-778","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-whm","tag-whitelist-ip-address-in-csf"],"_links":{"self":[{"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/posts\/778","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/comments?post=778"}],"version-history":[{"count":3,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/posts\/778\/revisions"}],"predecessor-version":[{"id":785,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/posts\/778\/revisions\/785"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/media\/784"}],"wp:attachment":[{"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/media?parent=778"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/categories?post=778"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostingdelhi.net.in\/tutorials\/wp-json\/wp\/v2\/tags?post=778"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}