Firewalld list rules

To list rules use command

To list all open ports


See firewall-cmd […]

Read More…

Install CSF Firewall

For non cpanel server, install perl modules

On Ubuntu

Once we have requirments installed, install csf with

See csf […]

Read More…

Block Country in CSF firewall

CSF firewall can block all traffic from a country or list of countries using the GeoIP database. To block a country, edit the file


Replace with

Here is an example to block all traffic from China

If you want to block another country, you can add it like

Now […]

Read More…

How to Block a Country in CSF firewall

To block all traffic from a country in CSF Firewall edit file /etc/csf/csf.conf

Find the line

In this line, you can add 2 Letter country code. For example to block China and Russia, add

Now you need to restart firewall with command


Read More…

Unban an IP from CSF Firewall

To unban an IP from CSF firewall, run

Here i have an IP blocked in firewall.

To see if CSF is blocking the IP, run

Example This command also give reason for why the IP is blocked. Lets unban the IP address with command

Now IP should not be listed in […]

Read More…