ipx-web strips Cloudflare Access headers from the tunnel too #209

Closed
opened 2026-10-12 07:17:00 -07:00 by rays · 1 comment
Owner

Found during the #203 cutover. Caddy listens dual-stack in the container, so a connection from the ipx_default gateway arrives as ::ffff:192.168.64.1. The Caddyfile's remote_ip {$TUNNEL_PEER} (192.168.64.1) does not match the IPv4-mapped form, so Caddy strips Cf-Access-* from cloudflared's requests as from anyone else's, and Access sign-in through ipodderx.sdf1.net falls back to the password form. Shown with netstat in ipx-web and a forged-signature Access token that never reached ipx's token check. The browser suite missed it: there Caddy binds 127.0.0.1, IPv4 only.

Found during the #203 cutover. Caddy listens dual-stack in the container, so a connection from the ipx_default gateway arrives as ::ffff:192.168.64.1. The Caddyfile's `remote_ip {$TUNNEL_PEER}` (192.168.64.1) does not match the IPv4-mapped form, so Caddy strips Cf-Access-* from cloudflared's requests as from anyone else's, and Access sign-in through ipodderx.sdf1.net falls back to the password form. Shown with netstat in ipx-web and a forged-signature Access token that never reached ipx's token check. The browser suite missed it: there Caddy binds 127.0.0.1, IPv4 only.
rays added the bug label 2026-10-12 07:17:00 -07:00
Author
Owner

Not a bug. Caddy reports an IPv4 peer as plain IPv4 on its dual-stack socket (checked with caddy respond in the container), so remote_ip 192.168.64.1 matched all along. The stripped headers came from testing on Tower itself: its requests reach the published port as 192.168.1.130, rightly not the tunnel. From a container on cloudflared's network a forged Access token reaches ipx's check and is refused (InvalidSignature). The change is reverted in 0c820bb.

Not a bug. Caddy reports an IPv4 peer as plain IPv4 on its dual-stack socket (checked with caddy respond in the container), so remote_ip 192.168.64.1 matched all along. The stripped headers came from testing on Tower itself: its requests reach the published port as 192.168.1.130, rightly not the tunnel. From a container on cloudflared's network a forged Access token reaches ipx's check and is refused (InvalidSignature). The change is reverted in 0c820bb.
rays added invalid and removed bug labels 2026-10-12 07:20:21 -07:00
rays closed this issue 2026-10-12 07:20:22 -07:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rays/ipx#209