Config Server Firewall is known as CSF. This is most popular firewall for linux to secure your server. It comes with many useful features, You can manage CSF by command line or control panel.

From Command line you can edit csf configuration file /etc/csf/csf.conf

To allow Country you can use option CC_ALLOW


To block Country you can use option CC_DENY


After changes save and restart firewall.

csf -r

Similarly you can block country by using WHM go to plugin section


1. Config Server Security & Firewall

2. Firewall Configuration



Now in firewall configuration section you can block and allow country by using CC_ALLOW and  CC_DENY



In above screenshot you can see some countries are block like CN = China , RU = Russia and CC_ALLOW IN = India is allowed.

After changes restart your firewall.


That’s it!