Files
rustyip/deploy/terraform
NetworkCatsandClaude Opus 5.5 cd46024a46 Restrict HTTPS to Cloudflare with UFW on the host
The Vultr firewall now only opens 443 (and SSH); the host decides who may
use it. Docker-published ports bypass UFW's INPUT rules, so the new
firewall role routes Docker traffic through UFW's route rules via the
DOCKER-USER chain and allows Cloudflare's IPv4 ranges on 443 with
`ufw route allow`. ufw-cloudflare-sync keeps those rules in step with
https://www.cloudflare.com/ips-v4 daily via a systemd timer, refusing
to touch the rules if the list looks wrong.

The role runs on every deploy, before HAProxy starts, and fails the
deploy if the filtering is not in place, since HAProxy trusts
CF-Connecting-IP from anything that reaches it. The plain UFW allows
for 80/443 are dropped from the base role as they never applied to
Docker-published ports.

Rotating the deploy SSH key now rebuilds the instance, because Vultr
only installs SSH keys at creation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 21:13:48 +08:00
..