How to run docker with csf firewall

When running docker on a server with CSF firewall, you may face network connection error because iptables rules added by docker getting replaced by CSF firewall. If your docker installation is exposing service to localhost, which is skipped by CSF firewall by default, you can do the following, which will skip the docker0 interface also, … Read more

csf error path to iptables is either not set or incorrect

Whem install csf firewall on Ubuntu 20.04, i get following error root@ok:~# csf *Error* The path to iptables is either not set or incorrect for IPTABLES [/usr/sbin/ip6tables] in /etc/csf/csf.conf at /usr/local/csf/lib/ConfigServer/URLGet.pm line 26. Compilation failed in require at /usr/sbin/csf line 21. BEGIN failed–compilation aborted at /usr/sbin/csf line 21. root@ok:~# This is because path for iptables … 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 vi /etc/csf/csf.conf Find the line CC_DENY = “” In this line, you can add 2 Letter country code. For example to block China and Russia, add CC_DENY = “CN,RU” Now you need to restart firewall with command systemctl restart lfd csf -r