Measure whether services see real client IPs or docker-proxy's address #30
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#30
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
modules/firewall.nix(PUBLISHED CONTAINER PORTS) records that a large share of internet traffic to published ports arrives through docker's userland proxy, whose connections show the bridge gateway as their source instead of the client.Where that happens, per-client-IP controls are keyed on the wrong address:
Nothing has measured how much traffic is affected. To find out, on the vps:
Public addresses in the
rip=list and nodocker-proxyin the last command means real IPs arrive and this can be closed. Otherwise the fix is making docker preserve the source address, which needs care: the firewall comment describes the half-working failure mode that change can cause.Related finding, measured over the tailnet after caddy's tailnet listener started publishing 8443/udp (#29):
iifname tailscale0 udp dport 443 redirect to :8443So caddy speaks HTTP/3 on 8443 and the redirected path delivers to it, but udp sent straight to the published port does not arrive. It is likely the same docker port-publishing behaviour as above. #29 works around it by advertising
h3=":443"from the tailnet sites. To pin it down on the vps:Answered: real client addresses reach both caddy and the mail server.
pages.from one client, exactly 300 through and 30 answered 429. Every connection was counted against the client's real address. A relay-masked connection would have looked private and been exempt.107.150.111.167,162.243.51.251), and the postfix jail had banned six public addresses./var/log/mail.loglinks to/var/log/mail/mail.log, so the jails read the real log. The dovecot jail's zero failures are genuine: the whole log has two authentication failures, because scanners mostly probe and leave.172.18.xentries are containers on the proxy network, now exempt from bans (#29).The udp 8443 quirk is recorded in network.md; nothing uses that path. Closing with #29 (
fa265b4).