CrowdSec decisions never ban clients: rootless podman hides real source IPs #1

Open
opened 2026-09-09 20:22:56 +00:00 by ddelhalt · 0 comments
Owner

Problem

Traefik and Vaultwarden logs show the podman internal gateway IP instead of the actual client IP, so CrowdSec never produces effective bans.

Root cause

Rootless podman publishes ports via rootlessport, a userspace proxy that SNATs all inbound connections. Traefik sees the container network gateway as the socket peer, writes it as ClientHost, and passes it to backends through X-Forwarded-For.

Fix (deferred — blocked on host/OS migration)

Set rootless_port_forwarder = "pasta" in [network] of containers.conf with podman >= 6.0 and passt with the pesto binary. This enables kernel-level port forwarding that preserves the original client source IP.

Verification

  • External request → real public IP in ClientHost in traefik access logs
  • Failed vaultwarden admin logins → cscli decisions list entry + nft list sets ban
## Problem Traefik and Vaultwarden logs show the podman internal gateway IP instead of the actual client IP, so CrowdSec never produces effective bans. ## Root cause Rootless podman publishes ports via `rootlessport`, a userspace proxy that SNATs all inbound connections. Traefik sees the container network gateway as the socket peer, writes it as `ClientHost`, and passes it to backends through `X-Forwarded-For`. ## Fix (deferred — blocked on host/OS migration) Set `rootless_port_forwarder = "pasta"` in `[network]` of containers.conf with podman >= 6.0 and passt with the `pesto` binary. This enables kernel-level port forwarding that preserves the original client source IP. ## Verification - External request → real public IP in `ClientHost` in traefik access logs - Failed vaultwarden admin logins → `cscli decisions list` entry + `nft list sets` ban
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ddelhalt/ansible-podman-selfhosted#1
No description provided.