Close the remaining brute-force and admin-exposure gaps #29
No reviewers
Labels
No labels
area/backups
area/ci
area/containers
area/mail
area/minecraft
area/network
area/observability
area/tls
area/tofu
kind
bug
kind
chore
kind
feature
kind
investigation
kind
security
priority
high
priority
low
priority
medium
status/blocked
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
hutao/vps!29
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/auth-hardening"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to the caddy rate-limit change (
a71aadb): the remaining brute-force and admin-exposure gaps, and the handbook brought up to date.What changes
ignoreIPgains172.16.0.0/12.forgejo-sshbans into the forward chain, so a banned bridge address would take every container down (the 2026-09-05 outage).operations/recovery.mdalready said to keep private ranges there.fail2ban-jail.cf. Roundcube's IMAP logins come from a docker address, so six wrong webmail passwords in a week would have banned Roundcube and taken webmail down for everyone.Authorization: Basicongit.is capped at 30/min per client IP. The login zone could not see it, and Forgejo has no throttle of its own./socket.io/with a 404 on the publicstatus.. kuma's login travels inside that socket, so no HTTP rate limit can count attempts; the public status page never uses it./adminand/api/v1/admin/*return 404 publicly. Personal and org settings stay public.git.andstatus.lookups from tailnet devices to a CoreDNS on the vps, which answers with the tailnet address. Nothing is configured per device. The name list is computed in caddy.nix and has to agree with tofu'ssplit_dns_subdomains.git@git.hu-tao.dev. Deploys and the runner's jump hop now use sshd on 2222.Alt-Svc: h3=":443"after split DNS movedgit.to the tailnet address, sent QUIC to udp 443 there, and Forgejo's webpack chunks failed with ChunkLoadError. The firewall now redirects tailscale0's udp 443 to caddy's tailnet listener, which publishes 8443/udp and speaks HTTP/3. The tailnet sites advertiseh3=":443", because udp 8443 sent directly does not arrive (recorded as a known quirk). An interim commit removed the public advertisement instead; the later commits undo that.pages.got exactly 300 through and 30 × 429, so caddy counted the client's real address on every one. docker-mailserver's postfix jail had banned six public addresses. The firewall comment and network.md record it.Verified
caddy validatepasses on the generated Caddyfile.//admin,/api//v1/admin/*) on the public copy, runner or not, and proxied them on the tailnet copy.git.andstatus., and refused everything else.tofu validatepasses, and both hosts evaluate from a clean checkout.tofu apply: the admin paths are reachable over the tailnet (desktop and phone) and 404 publicly, and public DNS is unchanged. Over the tailnet, the chunks that failed return 200 over h3,/admin303 over h3; publicly over h3,/adminis 404.After merge
Deployed from the branch and
tofu apply'd already. The one thing not yet exercised is a runner deploy throughProxyJump=hutao@vps:2222.Fixes #30