How do I block/whitelist IP within a server?

Using CSF it is possible to block/whitelist and IP address. Also, we can block traffic from a country.

Whitelisting an IP Address in CSF:

Use Quick Allow

  • The Quick Allow option will allow the IP address access to all ports.
  • Navigate to the ‘CSF – Quick Actions‘ section on the Security page.
  • Enter the IP address you’d like to allow. This will allow the IP address through all ports.
  • Click on Quick Allow to allow the IP address.

Use Quick Ignore

  • Enter the IP address in the Quick Ignore section of CSF.
  • Warning: Only use this setting for trusted IP addresses.
  • Click Quick Ignore to allow the IP address through your firewall.

Blocking an IP in CSF:

Use Quick Deny

  • Scroll down to the box saying, Quick Deny.
  • This button should have a text field to the left of it. This is the option you want to use for blocking an IP.
  • Input the IP you want to block in the field.
  • Click Quick Deny to apply the block.

Unblocking an IP in CSF:

Use Quick Unblock

  • Scroll down to the box saying Quick Unblock.
  • This button should have a text field to the left of it. This is the option you want to use to unblocking an IP.
  • Input the IP you want to unblock in the field.
  • Click quick unblock to remove the block.