Skip to content
Network privacy

Forwarded, origin IP, and privacy across proxy chains

RFC 7239 standardizes Forwarded for information otherwise lost through proxying. That information is sensitive and should be enabled deliberately.

2 min readReviewed and updated: August 6, 2026

Key points in one minute

  • Trust Forwarded only within a controlled chain.
  • A pseudonymous correlation ID is often enough for diagnostics.
  • The edge rebuilds the header rather than trusting an external value.
  • Forward only the parameter required by a specific consumer.

Data carried

The for, by, host, and proto parameters can reveal client address, proxy interface, original host, and connection scheme.

First identify which component actually consumes for, by, host, or proto and for what decision. If the application needs only the original scheme for redirects, do not forward the full client address. A correlation ID plus an edge record is often enough for investigations. Document chain direction, IPv6 formatting, and handling of unknown or obfuscated identifiers.

Client spoofing

An external client can send the header itself. The edge proxy should remove untrusted values or create a new verifiable chain.

At the external edge, remove Forwarded and equivalent X-Forwarded-* values supplied by untrusted clients, then create a new value. Internally, allow only known proxy hops over authenticated connections to append. Applications should trust a bounded hop count and parse the chain by a documented rule; accepting the first address blindly enables audit and access-control spoofing.

Minimization

Send only parameters required for a defined function. The standard supports obfuscated identifiers for tracing without exposing internal structure.

If an exact IP is unnecessary after the operational window, replace it with a stable pseudonymous identifier protected by a separate key or aggregate to a network prefix where purpose permits. Pseudonymization does not necessarily remove personal-data obligations, so basis and safeguards still matter. Keep addresses out of client responses, telemetry tags, and error messages.

Retention and access

If IP addresses enter logs, document purpose, access scope, and retention. Export them only under an established basis.

For each IP copy, define storage, roles, search, export, and automated deletion. A full address in a short-lived security log and aggregate statistics may need different periods. Reassess purpose and basis before a new use such as marketing analytics. Verify current legal and contractual requirements before enabling the feature.

Practical checklist

  1. 1Define trusted proxy hops.
  2. 2Remove untrusted inbound headers.
  3. 3Transmit the minimum parameter set.
  4. 4Verify trusted hop count and parsing order.
  5. 5Remove IP addresses from telemetry tags and errors.

Sources and documentation

This material is based on primary, official, and technical sources. The article is an original summary written for this knowledge base.

This material is for general information only. Requirements should be checked against the current law and, when needed, with a qualified specialist. It is not individual legal advice.

  1. 1.RFC Editor / IETF: RFC 7239: Forwarded HTTP Extension
  2. 2.OWASP Foundation: Logging Cheat Sheet
  3. 3.Президент России: Базовый текст Федерального закона от 27.07.2006 № 152-ФЗ «О персональных данных»

Continue reading

More articles on related topics

Routing boundaries

Why some traffic can bypass a proxy: PAC, DIRECT, and WebRTC

Read

Authentication

HTTP proxy authentication and the 407 response

Read

SOCKS5 access

Username and password in SOCKS5: how access is verified

Read