Skip to content

Latest commit

Β 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” CSF Auto Configuration Script

This bash script automates the initial setup and hardening of CSF (ConfigServer Security & Firewall) on your Linux server.

βœ… Features

  • Disables test mode
  • Blocks specific countries (CN, IN, BR)
  • Limits concurrent connections (CT_LIMIT = 20)
  • Enables brute force protection for cPanel & WHM
  • Ensures CSF & LFD start on boot
  • Provides notes for manually allowing/denying IPs

⚑ IMPORTANT ⚑

Before running this file, please open the file and change the value of CC_DENY = "CN,IN,BR" to the countries you want to restrict.

πŸ“¦ Usage

chmod +x csf-setup.sh
sudo ./csf-setup.sh

πŸ“ Manual Steps

After running the script, you can:

  • Add allowed IPs:
    nano /etc/csf/csf.allow

  • Add denied IPs:
    nano /etc/csf/csf.deny

πŸ“ Note

This script is for educational/demo purposes. Always test on a staging server before applying to production.


Created with ❀️ by Ela

About

Bash script to automate initial hardening and configuration of CSF firewall on Linux servers.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages