Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/robertripoll/cloudflare-firewall-rules
Python script to update `firewalld` rules to restrict HTTPs traffic to CloudFlare IPs only
https://github.com/robertripoll/cloudflare-firewall-rules
api cloudflare firewall firewall-rules firewalld ip ipv4 ipv6 python python3 traffic
Last synced: 2 days ago
JSON representation
Python script to update `firewalld` rules to restrict HTTPs traffic to CloudFlare IPs only
- Host: GitHub
- URL: https://github.com/robertripoll/cloudflare-firewall-rules
- Owner: robertripoll
- License: mit
- Created: 2024-06-23T12:00:39.000Z (7 months ago)
- Default Branch: master
- Last Pushed: 2024-07-06T08:28:35.000Z (6 months ago)
- Last Synced: 2024-11-11T06:44:34.283Z (2 months ago)
- Topics: api, cloudflare, firewall, firewall-rules, firewalld, ip, ipv4, ipv6, python, python3, traffic
- Language: Python
- Homepage:
- Size: 44.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cloudflare Firewall Rules
This project is a tool for synchronizing firewall rules with the latest Cloudflare IP addresses.
It adds rules to `firewalld` allowing traffic coming from Cloudflare IP addresses on port 443.
## Requirements
This project requires Python 3.10 or higher.
## Installation
To install the project, follow these steps:
1. Clone the repository:
`git clone https://github.com/robertripoll/cloudflare-firewall-rules.git`
2. Install the dependencies:
`pip install -r requirements.txt`
## Usage
To use the script, run the following command:
`sudo python main.py`
_The command has to be run with `sudo` because `firewall-cmd` requires `root` privileges._
This will synchronize the firewall rules with the latest Cloudflare IP addresses.
## License
This project is licensed under the [MIT License](LICENSE).