Skip to content

Instantly share code, notes, and snippets.

View SzymonLisowiec's full-sized avatar
☺️
All fine

Szymon Lisowiec SzymonLisowiec

☺️
All fine
View GitHub Profile
@SzymonLisowiec
SzymonLisowiec / cloudflare-ufw.sh
Last active June 9, 2023 21:47 — forked from jakejarvis/cloudflare-ufw.sh
UFW rule updater to only allow HTTP and HTTPS traffic from Cloudflare IP address ranges
#!/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