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 22.214.171.124 should be replaced with the actual IP address.
Searching for blocks
csf -g 126.96.36.199
csf -ar 188.8.131.52
Whitelist IP address
csf -a 184.108.40.206 “reason for whitelisting”
Remove temporary block
csf -tr 220.127.116.11
Remove Permanent block
csf -dr 18.104.22.168
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/