๐Ÿ“ฆ How to Backup & Restore CSF Configuration

Absolutely! Hereโ€™s a clear, step-by-step guide you can use or share:


CSF (ConfigServer Security & Firewall) stores its configuration and important allow/deny/ignore lists in /etc/csf. Backing these up ensures you can restore your firewall settings if needed.


๐Ÿ”น Backup CSF Configuration

  1. Open a terminal and switch to the CSF directory: cd /etc/csf
  2. Create a compressed archive of your configuration and lists: tar cvfz csfbackup.tgz csf.conf csf.allow csf.deny csf.*ignore
    • csf.conf โ€“ main configuration file
    • csf.allow โ€“ manually allowed IPs
    • csf.deny โ€“ manually denied IPs
    • csf.*ignore โ€“ all ignore lists
  3. The file csfbackup.tgz will be created in /etc/csf. Keep this in a safe location (e.g., off-server backup or version control).

๐Ÿ”น Restore CSF Configuration

  1. Go back to the CSF directory: cd /etc/csf
  2. Extract the backup archive: tar -zxvf csfbackup.tgz
  3. Restart CSF to apply restored settings: csf -r

Thatโ€™s it! Your CSF configuration is now backed up or restored.


Scroll to Top