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: https://www.configserver.com/cp/csf.html

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 198.192.2.1 should be replaced with the actual IP address.

Searching for blocks

csf -g 198.192.2.1

Remove Whitelisting

csf -ar 198.192.2.1

Whitelist IP address

csf -a 198.192.2.1 “reason for whitelisting”

Remove temporary block

csf -tr 198.192.2.1

Remove Permanent block

csf -dr 198.192.2.1

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 https://www.racknerd.com/

Server Hosting Solutions by RackNerd:

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

Leave a comment

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