Easily manage SSL/TLS cipher suites for Cloudflare zones with this Python script. List zones, view/update ciphers using predefined (Modern, Compatible, Legacy) or custom lists. Features logging for tracking changes.
A subscription to CloudFlare Advanced Certificate Manager is required to set custom cipher suites
-
Clone the repository or download the cf-set-ciphers.py script.
-
Set up a Python virtual environment and activate it:
bash:
python3 -m venv venv
source venv/bin/activate -
Install the required packages:
pip install requests
- chmod 0700 cf-set-ciphers.py
- Run the script: ./cf-set-ciphers.py [-lz -lc]
- Follow the prompts to enter your Cloudflare API token and desired options.
- List zoneID's and their names: python cf-set-ciphers.py -lz
-
List the current ciphers for the specified zone:
python cf-set-ciphers.py -lc
-
Update the cipher list for a zone:
python cf-set-ciphers.py
The script logs all actions and errors to the cf-set-ciphers.log file in the same directory as the script. This allows you to track changes and troubleshoot issues if needed.