a month ago
Hello Railway team,
Could you confirm the supported way for an ASP.NET Core application to authenticate Railway public HTTP ingress separately from direct sibling private-network callers before trusting X-Real-IP?
Your public networking specifications document X-Real-IP. In the earlier discussion https://station.railway.com/questions/supported-trust-model-for-client-ip-head-aafb68bc, a Railway employee confirmed that 100.0.0.0/8 is not guaranteed to be stable. We therefore do not want to guess an immediate-peer allowlist or trust broad private ranges.
- Is there a supported signed header, origin authentication mechanism, per-service inbound network restriction, or listener/interface separation that identifies public ingress and cannot be reproduced by a private-network caller?
- If an exclusive immediate-proxy allowlist is supported instead, where is the maintained list and what stability guarantee applies across restarts, scaling and region changes?
- Does the recommended mechanism cover both IPv4 and IPv6, Railway-provided domains and custom domains?
We need to reject private callers that forge X-Real-IP, X-Forwarded-For or X-Forwarded-Proto while preserving valid public traffic. Public-path spoofing tests alone cannot establish this trust boundary.
Please link the supported configuration or confirm if this requires a separately authenticated proxy/origin boundary. This is a general platform question; no service identifiers, credentials, logs or end-user data are included.
Thank you.
1 Reply
a month ago
We don't offer a signed forwarding header, an origin-authentication mechanism, an edge-only listener or interface, or a per-service switch that limits inbound traffic to our edge. The proxy addresses your container sees as the socket peer are not a published or stable range, so there is no maintained allowlist to rely on, across restarts, scaling, regions or address families.
Requests through our public HTTP edge, on both Railway-provided and custom domains, have X-Real-IP, X-Forwarded-For, X-Forwarded-Proto and X-Forwarded-Host overwritten, so caller-supplied copies are replaced. Direct requests over *.railway.internal skip the edge and its header sanitization. Other services in the same project and environment can reach your listening port and send their own forwarding headers, so seeing X-Real-IP does not prove a request came through the edge.
Private networks are isolated between projects and environments, and services in one environment share a single trust boundary. That means ASP.NET Core Forwarded Headers trust only works if you trust every path to the listener in that environment, including any TCP proxy. If you need to separate public callers from private ones inside that boundary, your application or a proxy you run has to authenticate that boundary itself. We don't provide that.
Status changed to Awaiting User Response Railway • about 1 month ago
Status changed to Solved nicolasdepauw • about 1 month ago