Page 1 of 1

How to block countries using CSF firewall ?

Posted: Mon Dec 05, 2016 4:50 am
by chris ben
Is it possible to block countries using CSF firewall ?

Re: How to block countries using CSF firewall ?

Posted: Mon Dec 05, 2016 4:54 am
by Martin
Hello,

Yes, it is possible to block counties using CSF.

1. Log into server via SSH

2. Edit CSF configuration file

vi /etc/csf/csf.conf

3. Search for 'CC_DENY ' and enter the country code to block

CC_DENY = ""

Example : CC_DENY = "US" -- this will block united states.

5. Save the file and exit

6. Restart the firewall : csf -r

=============================
Martin
Linux Support Engineer.
Nixtree Solutions
Managed Full Server Backups
https://www.nixtree.com/managed-backups.php
Follow us on : https://twitter.com/nixtree