How To Block or Unblock an IP Address in CSF.

How to Block an IP address in CSF

1. Block an IP and add to /etc/csf/csf.deny.

Ex. csf -d

2. Block the IP for temporary deny list in  /var/lib/csf/csf.tempban

Ex. csf -tr

How To Unblock an IP Address in CSF

1. Check CSF for Your IP Address Block or not.

Ex. csf -g

2. If the IP address is denied in CSF and you want to remove it, then use this command:

Ex. csf -dr

3. CSF then needs to be restarted for the change to take effect:

Ex. csf -r

4. Remove an IP from the temporary IP ban or allow list.

Ex. csf -tr

5. Whitelist IP 

Ex. csf -a

6. Whitelist temporary IP

Ex. csf -ta

Was this article helpful?

mood_bad Dislike 0
mood Like 1
visibility Views: 204