adding hacky CloudFront firewall script for opsec

This commit is contained in:
Corey Ham
2021-10-01 11:38:49 -07:00
committed by GitHub
parent 8ad67da078
commit cb258302ea
+7
View File
@@ -0,0 +1,7 @@
#!/bin/bash
apt install ufw
ufw allow ssh
ufw default deny incoming
ufw default allow outgoing
for ip in $(curl https://ip-ranges.amazonaws.com/ip-ranges.json | jq '.prefixes[] | select(.service? == "CLOUDFRONT") | .ip_prefix?' | tr -d '"'); do ufw allow proto tcp from $ip to any port 80,443; done
ufw enable