How to Block and Unlock an IP address with CSF (ConfigServer Firewall)

Leave a comment on How to Block and Unlock an IP address with CSF (ConfigServer Firewall)

CSF Stands for Config Server Security and Firewall. With this software, you can control the traffic flowing to your server, prevent DDoS attacks, and track network connections.

In short CSF is a sophisticated software firewall, you can check the official documentation on website to more:

The below article assumes you already have CSF Firewall installed and running on your server. Are you wondering how to block and unblock IP addresses with ConfigServer Firewall? Now let’s move on to the commands that you can use to search, blocks and unlock IP address.

The IP address should be replaced with the actual IP address.

Searching for blocks

csf -g

Remove Whitelisting

csf -ar

Whitelist IP address

csf -a “reason for whitelisting”

Remove temporary block

csf -tr

Remove Permanent block

csf -dr

Alternatively, if your server is running cPanel/WHM, you can do it from your WHM Control panel going to WHM » ConfigServer Security & Firewall

Tip: What should I do if my own IP address is blocked from accessing my server?

There are several options here. The easiest method would be to access the WHM control panel or SSH on using alternate IP address (such as via a cell phone internet connection or through a VPN), and unblock your IP.

The other option is, if you have console / out of band access to your server, i.e. IPMI or HTML5 VNC Console, you can log into the console as root and utilize the above commands to unblock your IP address. RackNerd includes IPMI access with all of its bare metal dedicated servers, and a HTML5 VNC Console with all of its VPS (virtual private server) services. If you are looking for a VPS or dedicated server, be sure to take a look at our hosting offerings at

Server Hosting Solutions by RackNerd:

Shared Hosting
cPanel Web Hosting in US, Europe, and Asia datacenters
Reseller Hosting
Create your new income stream today with a reseller account
VPS (Virtual Private Server)
Fast and Affordable VPS services - Instantly Deployed
Dedicated Servers
Bare-metal servers, ideal for the performance-demanding use case.

Leave a comment

Your email address will not be published. Required fields are marked *