Skip to content

Instantly share code, notes, and snippets.

View Interstellar750's full-sized avatar
😵‍💫
Dazed

Hubert Chen Interstellar750

😵‍💫
Dazed
View GitHub Profile
@Interstellar750
Interstellar750 / add_cf_ips.sh
Last active April 5, 2024 08:10
Use ufw to quickly add Cloudflare’s IP to your firewall whitelist
#!/bin/bash
if [ "$#" -eq 1 ]; then
if [[ "$1" == "--remove" ]]; then
remove=true
else
echo "Error: Unknown parameter '$1'."
echo "Usage: bash $0 [--remove]"
exit 1
fi