CSF (ConfigServer Security & Firewall) is a tool for securing servers. It works with iptables, the built-in firewall system, to make setting up and managing security rules easier.
With CSF, you can control incoming and outgoing traffic by specifying rules based on IP addresses, ports, and protocols. This helps protect servers from unauthorized access and various security threats.
Essentially, CSF and iptables work together to create a strong defense system for servers, making it simpler for administrators to enhance security and prevent potential attacks.
If you lose access to your server from a specific IP address, it is likely due to the IP being blocked in the server firewall, which can cause timeouts across various services like Website, Email, SSH, and FTP access. This guide is designed to assist in verifying if an IP is Blocked in the ConfigServer & Firewall (CSF) or iptables and the steps to unblock it in Control Web Panel (CWP).
Related Article
Check for Blocked IP
IMPORTANT:This solution will require root access. If this needs to be obtained, follow the guide on requesting root access.
NOTE: These steps will need to be performed from an IP address that is not currently blocked on the server. Please contact our Support team if you do not have another means of accessing the server.
- SSH into the server as root
- Check for an active status by using either
service csf statusorservice iptables status - Check CSF for blocked IP addresses using
csf -g '12.34.56.78'
TIP: If the output does not yield any results and you still are not able to access, you can try the generic iptables checks by runningiptables -nL | grep 12.34.56.78.
REPLACE: 12.34.56.78 with the actual IP address.
TIP: You can visit whatsmyipaddress or EasyIP to check your IP address.
- Check for the blocked IP reason
grep 12.34.56.78 /var/log/lfd.log
REPLACE: 12.34.56.78 with the IP address blocked. - Unblock the IP from the deny List using
csf -dr 12.34.56.78
REPLACE: 12.34.56.78 with the IP address. - Restart CSF to save changes using
csf -r
Comments
0 comments
Article is closed for comments.