You find a bad IP and want to block it? You can easily block it with CSF.
You can block an IP/IP range from WHM or from the server bash.
Block an IP from WHM:
- Log in to WHM as root.
- Navigate to Plugins section, then to ConfigServer Security & Firewall
- Look for the Quick Deny section/button. Enter the IP/IP range in the red edit box. If you want, you can also add a comment in the next edit box.
- Click the Quick Deny button.
- The IP will be added to the block list – /etc/csf/csf.deny file – and you will see a confirmation message:
- Click the Return button to return to the CSF main page.
Block an IP from server bash:
- Log in to the server via SSH as root
- Use the command: csf -d IP
csf -d 18.104.22.168
You can also block IP blocks, like:
csf -d 22.214.171.124/24
csf -d 126.96.36.199/16