How to Manage the CSF Firewall in WHM/cPanel: Unblock and Whitelist an IP Address

Post Date: November 21, 2020
Last Updated: November 19, 2026

Introduction

ConfigServer Security & Firewall (CSF) is a Linux firewall management tool commonly used with cPanel and WHM. It helps server administrators manage IP addresses, control network access, and protect servers against suspicious login attempts.

CSF works with two main components:

  • ConfigServer Firewall (CSF): Manages firewall rules and controls which IP addresses can access the server.
  • Login Failure Daemon (LFD): Monitors server logs for suspicious activity, including repeated failed login attempts, and can temporarily or permanently block IP addresses.

Sometimes, a legitimate IP address may be blocked because of repeated failed login attempts or other security rules. In such cases, you can search for the blocked IP address, unblock it, and add it to the appropriate allow or ignore list through WHM.

In this article, we will explain how to unblock and whitelist an IP address using ConfigServer Security & Firewall in WHM/cPanel.

Prerequisites

Before proceeding, ensure that you have:

  • Root access to the WHM control panel.
  • ConfigServer Security & Firewall installed on the server.
  • The IP address you want to unblock or whitelist.
  • Access to the server through SSH if command-line operations are required.

How to Unblock an IP Address in CSF

Follow these steps to check whether an IP address is blocked and remove the firewall block.

Step 1: Log in to WHM and Open CSF

Log in to WHM using your root credentials.

In the WHM search bar, type ConfigServer Security & Firewall and open the plugin.

You can also navigate through:

WHM → Plugins → ConfigServer Security & Firewall

Step 2: Search for the IP Address

On the ConfigServer Security & Firewall page, locate the Search for IP option.

  1. Enter the IP address you want to check.
  2. Click the Search for IP button.
  3. Review the search results to determine whether the IP address is blocked.

The search results will display relevant firewall information about the IP address.

Step 3: Unblock the IP Address

If the IP address is blocked, CSF displays the block information and the corresponding unblock option.

Click the unlocked padlock icon or the available Unblock action next to the IP address.

This removes the applicable firewall block.

If the IP address is not blocked, CSF displays the search results without a matching active block.

Note: Removing a firewall block does not automatically prevent LFD from blocking the same IP address again if it continues to trigger security rules.

Step 4: Apply the Firewall Changes

If you need to reload the firewall rules manually, access the server through SSH as root and execute:

csf -r

This reloads the CSF firewall rules.

You can also use the Restart csf+lfd option in the WHM interface when both services need to be restarted.

How to Allow (Whitelist) an IP Address in CSF

If you want to allow an IP address through the firewall, you can add it to the CSF allow list using the Quick Allow option.

Step 1: Open the Quick Allow Option

Log in to WHM and navigate to:

Plugins → ConfigServer Security & Firewall

Locate the Quick Allow section on the CSF page.

Step 2: Add the IP Address

  1. Enter the IP address you want to whitelist in the Allow IP address field.
  2. Add a comment if required to identify why the IP address is being allowed.
  3. Click the Quick Allow button.

CSF adds the IP address to the firewall allow list (csf.allow).

This allows the IP address through the CSF firewall, but it does not exempt the address from LFD monitoring.

How to Add an IP Address to the CSF Ignore List

An IP address added to csf.allow can still be blocked by LFD if it triggers configured login-failure rules.

If you need to prevent LFD from automatically blocking a trusted IP address, you can add it to the CSF ignore list (csf.ignore).

Step 1: Locate the Quick Ignore Option

On the ConfigServer Security & Firewall page in WHM, locate the Quick Ignore section.

Step 2: Add the IP Address to the Ignore List

  1. Enter the IP address in the Quick Ignore field.
  2. Click the Quick Ignore button.
  3. Verify that the IP address has been added to the ignore list.

Adding an IP address to csf.ignore tells LFD to ignore that address when applying its automatic blocking rules.

The Quick Ignore action also applies the corresponding LFD changes through the CSF interface. If you make manual changes to the ignore file through SSH, reload or restart LFD to apply them.

For example:

systemctl restart lfd

Important: Add an IP address to the ignore list only when it is trusted and there is a valid operational reason. Ignored addresses receive reduced protection from LFD’s automatic blocking mechanism.

Difference Between csf.allow and csf.ignore

CSF uses separate files for firewall allow rules and LFD ignore rules.

Featurecsf.allowcsf.ignore
PurposeAllows an IP address through the CSF firewallExcludes an IP address from LFD monitoring and automatic blocking
Managed through WHMQuick AllowQuick Ignore
Controls firewall accessYesNo, not by itself
Prevents LFD blocksNoYes, for the applicable LFD checks
Configuration file/etc/csf/csf.allow/etc/csf/csf.ignore

If an IP address needs to be allowed through the firewall and protected from LFD automatic blocking, you may need to add it to both lists.

Useful CSF Commands for Managing IP Addresses

You can also manage IP addresses directly through SSH using CSF commands.

TaskCommand
Search for an IP addresscsf -g IP_ADDRESS
Allow an IP addresscsf -a IP_ADDRESS
Remove an IP address from the allow listcsf -ar IP_ADDRESS
Deny an IP addresscsf -d IP_ADDRESS
Remove an IP address from the deny listcsf -dr IP_ADDRESS
Restart CSFcsf -r
Restart CSF and LFDcsf -ra

Replace IP_ADDRESS with the actual IP address.

Run these commands with root privileges. Always verify the applicable firewall and ignore-list entries before making changes.

Troubleshooting: IP Address Still Blocked After Whitelisting

If an IP address remains blocked after adding it to the allow list, check the following:

  1. Check the CSF deny list: Search for the IP address using csf -g IP_ADDRESS and review the matching firewall rules.
  2. Check the LFD ignore list: Confirm whether the address is present in /etc/csf/csf.ignore if it needs to be excluded from LFD blocking.
  3. Check cPHulk: WHM’s cPHulk Brute Force Protection can block IP addresses independently of CSF.
  4. Check other security layers: Review any additional firewall, hosting-provider security, or intrusion-prevention rules that may be blocking the address.
  5. Review server logs: Check the relevant security and authentication logs to identify the reason for repeated blocking.

Do not add an IP address to the ignore list simply to bypass repeated security alerts. Identify and resolve the underlying cause whenever possible.

Conclusion

Managing blocked and allowed IP addresses through ConfigServer Security & Firewall is an important part of administering a cPanel server.

Using Search for IP, Quick Allow, and Quick Ignore, administrators can identify blocked addresses, allow trusted IPs through the firewall, and prevent unnecessary LFD blocks.

Understanding the difference between csf.allow and csf.ignore helps ensure that firewall access and automatic login-failure protection are configured correctly.

Frequently Asked Questions (FAQs)

1. How do I unblock an IP address in CSF through WHM?

Log in to WHM, open ConfigServer Security & Firewall, use the Search for IP option, enter the IP address, and click the available Unblock action.

2. What is the difference between Quick Allow and Quick Ignore in CSF?

Quick Allow adds an IP address to csf.allow, permitting it through the firewall. Quick Ignore adds it to csf.ignore, excluding it from LFD’s automatic blocking rules.

3. Why is my IP address still blocked after adding it to csf.allow?

An IP address in csf.allow can still be blocked by LFD. Add it to csf.ignore only if it is trusted and should be excluded from LFD blocking.

4. How do I restart CSF and LFD?

Run csf -r to reload the firewall rules or csf -ra to restart both CSF and LFD.

5. Can cPHulk block an IP address even if it is allowed in CSF?

Yes. cPHulk is a separate cPanel security feature and can independently block IP addresses. Check its reports if the IP address remains inaccessible.

References

Need Assistance?

Need help managing CSF firewall rules, troubleshooting blocked IP addresses, or securing your cPanel server?

The Pheonix Solutions technical team can assist with cPanel/WHM administration, firewall configuration, server security, and hosting infrastructure management.

For assistance, contact us.

admin

Our team has expertise across software and web development, WordPress, e-commerce, mobile applications, UI/UX, cloud and infrastructure, DevOps, CI/CD, API integration, security, testing, automation, and technical support. The team also works with AI-based software solutions, LLMs, AI workflows, AI agents, and intelligent application development to help businesses automate processes and build smarter digital solutions. We focus on developing, deploying, maintaining, and optimising secure, scalable, and reliable technology solutions while helping businesses adopt modern technologies and drive digital transformation.

Leave a Comment

Scroll to Top