This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# UFW rule updater to only allow HTTP and HTTPS traffic from Cloudflare IP addresses. | |
# Inspired by https://github.com/Paul-Reed/cloudflare-ufw/blob/master/cloudflare-ufw.sh | |
# | |
# To run as a daily cron job: | |
# 1. sudo crontab -e | |
# 2. Add this line to the end: | |
# @daily /this/file/location/cloudflare-ufw.sh &> /dev/null |