Skip to content

πŸ” A simple bash script to automatically enable CF UAM when CPU load is high

License

Notifications You must be signed in to change notification settings

AlexxSST/cf-auto-uam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation


cf-auto-uam

πŸ” A simple bash script to automatically enable CF UAM when CPU load is high

Presentation β€’ Installation β€’ Requirements β€’ License

Presentation

CF-Auto-UAM is a simple bash script coming along with an automatic installer which will install everything for you.

CF-Auto-UAM installs two cronjobs :

  • A cronjob which checks every 15 seconds for the CPU load and if it's higher than 10 it will enable CloudFlare Under Attack Mode.
  • A cronjob which checks every 10-30 minutes for the CPU load and if it's lower than 10 it will disable CloudFlare Under Attack Mode.

Installation

git clone https://github.com/AlexxSST/cf-auto-uam.git

cd cf-auto-uam

chmod 777 cf-auto-uam-install.sh

bash cf-auto-uam-install.sh

The installer will be asking for 3 things :

  • Your CloudFlare email
  • Your CloudFlare API key
  • Your domain CloudFlare zone ID

The installer has been tested on Ubuntu 16.04, Debian 8, CentOS 7. If the installer doesn't work on other versions of those GNU please open an issue.

Requirements

  • Root Access
  • Linux (Ubuntu/Debian/CentOS)
  • CloudFlare Account

License

MIT