Skip to content
Melbit Services
  • IT Services
    • Managed IT Services
    • Cloud Services
    • IT Consulting Services
    • Business Communication
    • Remote IT Support
    • Domain Names
  • Industries
    • Accounting Firms
    • Law Firms
    • Realestate
    • Medical Centres
    • Pharmacies
    • Conveyancing Firms
  • Cybersecurity
    • Cybersecurity Assessment
    • The Essential Eight
    • Cybersecurity Playbooks
    • Computer Security Threats
  • Remote IT Support
    • TeamViewer Windows
    • TeamViewer Mac
    • TeamViewer Linux
Get in Touch

Windows

23
  • Understanding MFA
  • How to change file creation or modified date
  • How to check if Microsoft Defender for Endpoint is running
  • Access to Removable Drives not Protected by BitLocker
  • The Group Policy settings for BitLocker startup options are in conflict and cannot be applied
  • How do you extend a User Profile Disk
  • Resizing User Virtual Disk RDP (Esxi VM)
  • Command and PowerShell History
  • How to increase the disk size of VM in VirtualBox
  • Saved Windows Credentials
  • View installed software using wmic
  • Pros and cons working with DNS, DHCP, IPAM, Wireless, LAN, WAN
  • What is a DHCP Server and DHCP relays
  • How to find user profile disk from registry
  • Enabling iPhone hotspot
  • Download Maps Manager Delayed Start Red in Server 2016
  • What is SSTP VPN?
  • How to Disable Revocation Check for SSTP VPN
  • Enabling Group Policy editor on Windows 10 Home
  • Source file names are larger than supported file system
  • Essential Network Ports for Windows Services
  • Another account from your organisation is already signed in
  • Disabling Office 365 Autodiscover – Exchange Self hosted
Linux

Linux

5
  • mysql-8.0-gpg package error
  • Windows Privilege Escalation
  • Linux Exim Cheat sheet
  • Rsync linux
  • CSF Shell Command

Networking

5
  • Windows Privilege Escalation
  • Cannot access FortiGate web GUI admin interface
  • How to find Fortinet PSK
  • Pros and cons working with DNS, DHCP, IPAM, Wireless, LAN, WAN
  • Disabling SIP ALG on FortiGate Firewall

General IT Support

15
  • How to improve the WIFI coverage in the office
  • Best Practices for Data Backup and Recovery
  • How to change file creation or modified date
  • Command and PowerShell History
  • How to increase the disk size of VM in VirtualBox
  • Saved Windows Credentials
  • View installed software using wmic
  • Cannot access FortiGate web GUI admin interface
  • How to find Fortinet PSK
  • Pros and cons working with DNS, DHCP, IPAM, Wireless, LAN, WAN
  • What is a DHCP Server and DHCP relays
  • How to find user profile disk from registry
  • Enabling iPhone hotspot
  • Disabling SIP ALG on FortiGate Firewall
  • Download Maps Manager Delayed Start Red in Server 2016

Network Connectivity

4
  • How to improve the WIFI coverage in the office
  • Enabling iPhone hotspot
  • Disabling SIP ALG on FortiGate Firewall
  • What is SSTP VPN?

Cyber Security & Compliance

4
  • How to check if Microsoft Defender for Endpoint is running
  • Access to Removable Drives not Protected by BitLocker
  • The Group Policy settings for BitLocker startup options are in conflict and cannot be applied
  • Windows Privilege Escalation

Remote IT Support & Helpdesk

6
  • mysql-8.0-gpg package error
  • Access to Removable Drives not Protected by BitLocker
  • The Group Policy settings for BitLocker startup options are in conflict and cannot be applied
  • How do you extend a User Profile Disk
  • Resizing User Virtual Disk RDP (Esxi VM)
  • Atera client not showing up in Customer’s dashboard
View Categories
  • Home
  • KB
  • Linux
  • CSF Shell Command

CSF Shell Command

3 min read

CSF Shell Command

Config Server Firewall (CSF) is a free and advanced firewall for most Linux distributions and Linux based VPS. In addition to the basic functionality of a firewall – filtering packets – CSF includes other security features, such as login/intrusion/flood detections. CSF includes UI integration for cPanel, DirectAdmin and Webmin, but this tutorial only covers the command line usage. CSF is able to recognize many attacks, such as port scans, SYN floods, and login brute force attacks on many services. It is configured to temporarily block clients who are detected to be attacking the cloud server.

Here are some helpful shell commands.

CommandExtended CommandDescriptionExample
csf -h–helpShow this messageroot@server[~]#csf -h
csf -r–restartRestart firewall rulesroot@server[~]#csf -r
csf -d [IP.add.re.ss] [comment]–deny ipDeny an IP and add to /etc/csf.denyroot@server[~]#csf -d 11.22.33.44 Blocked This Guy
csf -dr [IP.add.re.ss]–denyrm ipUnblock an IP and remove from
/etc/csf.deny
root@server[~]#csf -dr 22.33.44.55
csf -df–denyfRemove and unblock all entries in
/etc/csf.deny
root@server[~]#csf -df
csf -tr [IP.add.re.ss]–temprm ipRemove an IP from the
temporary IP ban or allow list.
root@server[~]#csf -tr 55.66.77.88
csf -td–tempdeny ip ttl
[-p port]
[-d direction]
Add an IP to the temp IP ban list.
ttl is how long to blocks for
(default:seconds, can use one suffix of h/m/d).
root@server[~]#csf -t
csf -a [IP.add.re.ss] [comment]–add ipAllow an IP and add to /etc/csf.allowroot@server[~]#csf -a 33.44.55.66 Home IP Address
csf -tf–tempfFlush all IPs from the
temporary IP entries
root@server[~]#csf -tf
csf -g [IP.add.re.ss]–grep ipSearch the iptables rules for an
IP match (incl. CIDR)
root@server[~]#csf -g 44.55.66.77
csf -v–versionShow csf versionroot@server[~]#csf -v
csf -u–updateCheck for updates to csf and
upgrade if available
root@server[~]#csf -u
csf -l–statusList/Show iptables configuration
csf -l6–status6List/Show ip6tables configuration
csf -s–startStart firewall rules
csf -f–stopFlush/Stop firewall rules
(Note: lfd may restart csf)
csf -q–startqQuick restart (csf restarted by lfd)
csf -sf–startfForce CLI restart regardless of
LFDSTART setting
csf -ar–addrm ipRemove an IP from /etc/csf.allow
and delete rule
csf -t–tempDisplays the current list of temp IP entries
and their TTLOptional port.
Optional direction of block can be one of: in, out or inout (default:in)
csf -ta–tempallow ip,
ttl [-p port]
[-d direction]
Add an IP to the temp IP allow list (default:inout)
csf -cp–cpingPING all members in an lfd Cluster
csf -cd–cdeny ipDeny an IP in a Cluster and add to /etc/csf.deny
csf -ca–callow ipAllow an IP in a Cluster and add to /etc/csf.allow
csf -cr–crm ipUnblock an IP in a Cluster and remove from /etc/csf.deny
csf -cc–cconfig
[name] [value]
Change configuration option [name] to [value] in a Cluster
csf -cf–cfile [file]Send [file] in a Cluster to /etc/csf/
csf -crs–crestartCluster restart csf and lfd
csf -w–watch ipLog SYN packets for an IP across iptables chains
csf -m–mail [addr}Display Server Check in HTML or email to [addr] if present
csf -lr–logrunInitiate Log Scanner report via lfd
csf -c–checkCheck for updates to csf but do not upgrade
csf -ufForce an update of csf
csf -x–disableDisable csf and lfd
csf -e–enableEnable csf and lfd if previously disabled
Share This Article :
  • Facebook
  • X
  • LinkedIn
  • Pinterest
Rsync linux
Melbourne business IT logo

Melbits is Melbourne Business IT Service and technology solutions provider. Our tailored and strategic approach ensures that your business will receive expert IT support, cybersecurity and consulting that aligns with your business needs, empowering your business, driving growth and success.

You can reach us at 03 9069 6788

IT Services

  • Managed IT Services
  • Cloud Services
  • Cybersecurity
  • Remote IT Services
  • Business Communication
  • IT Consulting

Industries

  • Accounting Firms
  • Law Firms
  • Realestate
  • Medical Centres
  • Pharmacies
  • Conveyancing Firms

Additional Links

  • About Us
  • Knowledge Base
  • FAQ
  • Contact

© 2025 Melbit Services, All Rights Reserved.

  • Terms and Conditions
  • Privacy Policy