This Bash script, automates the daily update of CloudFlare IP lists on a server. It performs the following tasks:
- Retrieves current CloudFlare IPv4 and IPv6 addresses.
- Updates the csf/cloudflare.allow file with the new IPs.
- Modifies csf.allow and csf.ignore files accordingly.
- Restarts CSF/LFD (ConfigServer Firewall and Login Failure Daemon).
- Creates a daily cron job for continuous automation.
To execute the script, run the following command:
bash <(curl -s https://raw.githubusercontent.com/mhos/cloudflareip-to-csf/main/cloudflare_ip_csf.sh)