Linux

NGINX Logs Show the Proxy IP? Configure Trusted Real IP Headers

The Back Room Tech Staff · Edited by Aseem Kishore
20 min read

The Back Room Tech is reader-supported. We may earn a commission when you buy through links on our site. Learn more.

NGINX logs your front proxy’s address because that proxy opens the connection to NGINX. NGINX real IP headers can restore the client address, but trust only verified proxy senders. Log both addresses to spot wrong headers, broken chains, and unsafe trust rules.

Prerequisites

Keep all config changes and forged-header tests inside an owned disposable Linux lab. Leave production systems, certificates, DNS, public firewall rules, and application authentication unchanged.

You’ll need:

  • Administrative access to the lab, with a second terminal or SSH session kept open.
  • A vendor-supported NGINX package with current security fixes.
  • The HTTP Real IP module in the installed NGINX build.
  • Python 3 for controlled HTTP requests.
  • Access to the existing front proxy’s config and logs.
  • A known forwarding path, including each proxy’s source address and header policy.

Record your exact Linux and NGINX versions first. Check package support and security status with the vendor, including any backported fixes. As checked November 26, 2026, upstream NGINX security advisories list 1.30.7/1.31.9 as fixed for the resolver, HTTP/2, HTTP/3 and mail-proxy issues grouped in the linked nginx2root report. The newer TLS 1.3 early-data CPU advisory requires 1.30.8/1.31.10.

For an upstream lab build, use at least 1.30.8 or 1.31.10 in the appropriate release branch and recheck current advisories. For distribution builds, require the package vendor’s explicit fixed/backported status for applicable issues; the version string alone is insufficient. Check enabled HTTP/2, HTTP/3, resolver, mail-proxy and TLS early-data features against each advisory. Stop if patch status cannot be established.

An existing Raspberry Pi or mini PC can host the lab if its Linux package meets these checks. The loopback tests below don’t need separate network hardware.

The commands select a separate configuration and PID file for a lab NGINX instance on 127.0.0.1:18080; they do not edit the system-service configuration. The listener and filesystem permissions still belong to the same host. Confirm that the port is unused and the lab paths are appropriate before starting it.

Sample logs, address selections, and status codes below illustrate checks for the supplied configuration. Actual results depend on your installed build, active configuration, permissions, and environment; compare them with fresh results from your lab.

Quick Diagnosis: NGINX Real IP Headers

Check the connection peer, then the header, then change trust. Start with trust, and you can get a log line that looks right for the wrong reason.

SymptomLikely causeFirst check
Every request shows the front proxyMissing trust, wrong header, or inactive configCompare the original peer with received headers
NGINX selects another proxyRecursive selection doesn’t match the chainTrace X-Forwarded-For from right to left
A direct caller can choose its logged addressTrust includes untrusted sendersRepeat the request from a distinct untrusted source
A real-IP directive is unknownWrong binary or missing moduleInspect nginx -V
Access rules change after restorationRules now see the restored $remote_addrTest allowed and denied requests
NGINX is correct but the application differsSeparate application proxy policyInspect existing upstream headers and application trust

Before changing anything, answer four questions:

  • Which proxy actually opens the connection to NGINX?
  • Which header does that proxy send?
  • Does it overwrite incoming values or append another address?
  • Can an untrusted caller connect to NGINX directly?

Stop if you don’t know an intermediary’s identity or header policy. An address in a header doesn’t prove who supplied it.

Build an Isolated Diagnostic Baseline

1. Map the trust boundaries

Write down the request path:

Client → Front proxy → NGINX → Application

Before request processing, NGINX sees the source address of its incoming connection. That could be the front proxy, a container gateway, or an address produced by network address translation.

Trust the verified sender NGINX actually sees. A proxy’s public address isn’t always its backend connection address.

Keep these boundaries separate:

BoundaryRequired evidence
Client to front proxyHow the proxy handles client-supplied forwarding headers
Front proxy to NGINXActual connection source and header delivered to NGINX
NGINX address selectionTrusted senders, selected header, recursive behavior
NGINX to applicationExisting upstream headers and application trust policy

The HTTP Real IP module changes NGINX’s working client address. Setting an application’s trusted proxies doesn’t change that address inside NGINX.

2. Check package status, build support, and active configuration

Run these read-only checks on the lab host:

cat /etc/os-release
command -v nginx
nginx -v
nginx -V 2>&1
python3 --version

Record the reported OS version, NGINX version, binary path, and package source. Check the package vendor’s support lifecycle and security notices before you proceed.

Also review the official NGINX security advisories. An upstream version number alone doesn’t prove a distribution package’s patch status. Vendors can backport fixes.

Look for this build argument:

--with-http_realip_module

Upstream source builds don’t include HTTP Real IP support by default. If the argument is absent, check the package vendor’s module packaging and any required load_module configuration before proceeding. Configure flags alone do not prove effective module availability; the same-binary full config test must accept the real-IP directives and variables. Don’t downgrade to obtain the module.

Inspect the lab’s existing service config using its actual binary and config path. For a package using its default config, that commonly starts with:

sudo nginx -T

Inspect this output locally. It can contain credentials and private upstream details. Find the active includes, log paths, real-IP settings, and rules that depend on client addresses.

The command-line reference explains -V, -T, and -t. Build output shows which components are available. A config test checks whether that binary accepts the proposed directives and variables.

Illustrative Linux and NGINX version checks showing HTTP Real IP module support

3. Create separate configuration and original-peer logging

Keep the following commands in one shell. They store the selected binary and a unique lab directory in shell variables.

NGINX_BIN="$(command -v nginx)"
LAB_DIR="$(mktemp -d /tmp/nginx-realip-lab.XXXXXX)"

chmod 755 "$LAB_DIR"
mkdir -p "$LAB_DIR/conf" "$LAB_DIR/logs" "$LAB_DIR/public/allowed"

printf 'realip lab\n' > "$LAB_DIR/public/index.html"
printf 'allowed client\n' > "$LAB_DIR/public/allowed/index.html"

printf '# No trusted senders in the baseline.\n' > "$LAB_DIR/conf/realip.conf"

printf 'Binary: %s\nLab directory: %s\n' "$NGINX_BIN" "$LAB_DIR"

The directory suffix will vary. Save the displayed path so another admin session can find the instance.

Create the main config:

# Writes the isolated instance's configuration at $LAB_DIR/nginx.conf.
cat > "$LAB_DIR/nginx.conf" <<'NGINX'
worker_processes 1;
pid logs/nginx.pid;
error_log logs/error.log notice;

events {
    worker_connections 128;
}

http {
    log_format realip_audit escape=json
        '{"client":"$remote_addr","peer":"$realip_remote_addr",'
        '"xff":"$http_x_forwarded_for","xreal":"$http_x_real_ip",'
        '"uri":"$request_uri","status":"$status"}';

    access_log logs/access.log realip_audit;

    server {
        listen 127.0.0.1:18080;
        server_name localhost;
        root public;

        include conf/realip.conf;

        location / {
        }

        location /allowed/ {
            allow 198.51.100.23;
            deny all;
        }
    }
}
NGINX

The key log fields are:

  • $remote_addr: the address NGINX uses after any real-IP processing that applies.
  • $realip_remote_addr: the original connection peer.
  • $http_x_forwarded_for and $http_x_real_ip: received header values, still untrusted evidence.

The module docs list $realip_remote_addr as available since NGINX 1.9.7. Confirm support in your installed package. Use the config test below to check escape=json support too.

JSON escaping prevents header text from breaking the log’s JSON structure. It doesn’t make the header trustworthy. The logging documentation covers log formats and escaping.

Back up both files before further edits:

cp -p "$LAB_DIR/nginx.conf" "$LAB_DIR/nginx.conf.before"
cp -p "$LAB_DIR/conf/realip.conf" "$LAB_DIR/conf/realip.conf.before"

4. Validate and start only the isolated instance

# -p sets this instance's prefix for relative paths.
# -c selects this instance's explicit configuration.
sudo "$NGINX_BIN" -p "$LAB_DIR/" -c "$LAB_DIR/nginx.conf" -t

On successful validation, look for message fragments such as:

syntax is ok
test is successful

Check that paths in the messages point to your lab config. Fix any errors before starting.

sudo "$NGINX_BIN" -p "$LAB_DIR/" -c "$LAB_DIR/nginx.conf"
sudo cat "$LAB_DIR/logs/nginx.pid"

Check that the PID file contains a process ID. If startup fails, inspect the lab error log:

sudo tail -n 30 "$LAB_DIR/logs/error.log"

Don’t use a generic service reload here. It could target a different NGINX instance.

Illustrative validation of the isolated NGINX lab configuration

5. Observe headers before adding trust

Create a small request helper:

# Writes the request helper at $LAB_DIR/request.py.
cat > "$LAB_DIR/request.py" <<'PYTHON'
import http.client
import sys

source = sys.argv[1]
path = sys.argv[2]
value = sys.argv[3] if len(sys.argv) > 3 else None

headers = {}
if value is not None:
    headers["X-Forwarded-For"] = value

connection = http.client.HTTPConnection(
    "127.0.0.1", 18080, timeout=5, source_address=(source, 0)
)
try:
    connection.connect()
    bound_source = connection.sock.getsockname()[0]
    connection.request("GET", path, headers=headers)
    response = connection.getresponse()
    print(f"source={bound_source} path={path} status={response.status}")
    print(response.read().decode("utf-8", errors="replace").strip())
finally:
    connection.close()
PYTHON

The helper uses Python’s documented HTTPConnection source_address argument, connects explicitly, and prints the socket’s actual local address before sending the request. Its finally block closes the connection after success or an exception. These tests require the Linux lab to allow connections from 127.0.0.2 and 127.0.0.3 to the loopback listener.

Run the baseline request using the Python version recorded above:

python3 "$LAB_DIR/request.py" 127.0.0.2 /baseline 198.51.100.23
sudo tail -n 1 "$LAB_DIR/logs/access.log"

A successful baseline run should print source=127.0.0.2 path=/baseline status=404 with the supplied static-file configuration, because /baseline does not exist. Confirm that the matching fresh NGINX log entry also records 127.0.0.2 as both client and peer. This illustrative entry shows the expected fields:

{"client":"127.0.0.2","peer":"127.0.0.2","xff":"198.51.100.23","xreal":"","uri":"/baseline","status":"404"}

Before adding trust, repeat the baseline command with 127.0.0.3 and confirm that both address fields change to 127.0.0.3. Resolve any bind, connection, or source-address mismatch before continuing. Repeat these helper checks on each Python version used for the lab.

In this example, the claimed client is present, but NGINX hasn’t accepted it. Confirm that distinction in your own baseline entry.

Repeat this check through the real front-proxy chain in the existing disposable deployment. Send a normal request and one carrying a controlled forwarding value. Compare what NGINX receives.

Check whether the proxy:

  • Replaces the incoming header with an address it observed.
  • Appends its observed peer to an existing chain.
  • Preserves a client-supplied value unchanged.

The loopback helper tests NGINX’s policy. It doesn’t establish how your actual front proxy handles headers.

6. Configure one exact trusted sender and verify both outcomes

For this harness, 127.0.0.2 represents the trusted sender. 127.0.0.3 remains untrusted.

# Writes the isolated instance's trust policy at $LAB_DIR/conf/realip.conf.
cat > "$LAB_DIR/conf/realip.conf" <<'NGINX'
set_real_ip_from 127.0.0.2;
real_ip_header X-Forwarded-For;
real_ip_recursive off;
NGINX

This single-address test uses recursion off on purpose. Its supplied header contains one address.

Validate, then reload only if validation succeeds:

sudo "$NGINX_BIN" -p "$LAB_DIR/" -c "$LAB_DIR/nginx.conf" -t &&
sudo "$NGINX_BIN" -p "$LAB_DIR/" -c "$LAB_DIR/nginx.conf" -s reload

A reload asks NGINX to replace its config. Check the lab error log and make new requests to confirm the running result. The NGINX control documentation explains reload behavior.

Run four cases:

python3 "$LAB_DIR/request.py" 127.0.0.2 /trusted 198.51.100.23
python3 "$LAB_DIR/request.py" 127.0.0.3 /untrusted 198.51.100.23
python3 "$LAB_DIR/request.py" 127.0.0.2 /missing-header
python3 "$LAB_DIR/request.py" 127.0.0.2 /changed-claim 203.0.113.77

sudo tail -n 4 "$LAB_DIR/logs/access.log"

Use these address selections as checks once the supplied policy is active:

RequestSelected clientOriginal peer
Trusted sender, supplied address198.51.100.23127.0.0.2
Untrusted sender, same supplied address127.0.0.3127.0.0.3
Trusted sender, absent header127.0.0.2127.0.0.2
Trusted sender, changed claim203.0.113.77127.0.0.2

The final case tests where trust takes effect. A trusted sender can supply another address. Its header policy matters as much as NGINX’s config.

Changing a header while keeping the same trusted source doesn’t test spoofing from an untrusted sender.

Illustrative NGINX loopback requests and original-peer audit fields

Common Issues and Solutions

Problem 1: NGINX logs still show the proxy address

Symptoms:

  • $remote_addr and $realip_remote_addr remain identical.
  • The forwarding header appears in the audit log.
  • Reloading seems to make no difference.

Cause: The connecting sender isn’t trusted, the wrong header is selected, or another config is active.

Solution:

  • Read peer from a new audit entry.
  • Compare it with the exact set_real_ip_from address.
  • Check whether the proxy supplies X-Real-IP or X-Forwarded-For.
  • Validate and reload the same binary and config that serve the request.

real_ip_header defaults to X-Real-IP. Receiving X-Forwarded-For doesn’t automatically select it.

This example assumes a proxy connects from 192.0.2.10 and supplies X-Forwarded-For:

# Inside the isolated lab server block.
# 192.0.2.10 is a documentation address, not a provider trust range.
set_real_ip_from 192.0.2.10;
real_ip_header X-Forwarded-For;
real_ip_recursive off;

Replace documentation addresses with observed, owned proxy addresses. Don’t put this example into the loopback harness unchanged.

Verification: Generate a new request. The selected client should change while peer retains the actual proxy address. An absent header should leave the peer address in use.

Problem 2: NGINX selects another proxy from X-Forwarded-For

Symptoms:

  • The selected address belongs to an intermediary.
  • A single-proxy test works, but the real chain doesn’t.
  • Enabling recursion changes the result unexpectedly.

Cause: Recursive selection and the trust list don’t match the verified forwarding chain.

With a trusted connecting peer:

  • real_ip_recursive off selects the last address in the configured header.
  • real_ip_recursive on walks backward through trusted addresses and selects the last non-trusted address.

Consider this example chain:

Client 198.51.100.23
  → Proxy A 192.0.2.20
  → Proxy B 192.0.2.10
  → NGINX

NGINX connection peer: 192.0.2.10
X-Forwarded-For: 198.51.100.23, 192.0.2.20
Trusted proxies: 192.0.2.10 and 192.0.2.20
SettingExpected selected addressReason
Recursion off192.0.2.20Last header address
Recursion on198.51.100.23Last non-trusted address
Recursion on, Proxy A untrusted192.0.2.20Selection stops at Proxy A

Solution: Verify both proxies and their header behavior before trusting both addresses. Then choose recursion for that exact chain.

To test the selection logic in the loopback harness:

# Writes the isolated instance's multi-address selection policy.
cat > "$LAB_DIR/conf/realip.conf" <<'NGINX'
set_real_ip_from 127.0.0.2;
set_real_ip_from 192.0.2.20;
real_ip_header X-Forwarded-For;
real_ip_recursive on;
NGINX

sudo "$NGINX_BIN" -p "$LAB_DIR/" -c "$LAB_DIR/nginx.conf" -t &&
sudo "$NGINX_BIN" -p "$LAB_DIR/" -c "$LAB_DIR/nginx.conf" -s reload

python3 "$LAB_DIR/request.py" 127.0.0.2 /chain-on "198.51.100.23, 192.0.2.20"
sudo tail -n 1 "$LAB_DIR/logs/access.log"

Verification: With this policy active, check for client=198.51.100.23 and peer=127.0.0.2. Change only real_ip_recursive to off, validate, reload, and repeat. Check whether the selected client changes to 192.0.2.20.

This simulates a received chain. Also verify the actual chain through the owned proxies.

Illustrative trusted-peer chain and recursive NGINX address selection

Problem 3: An untrusted caller can choose its logged address

Symptoms:

  • A direct untrusted connection adopts its supplied forwarding value.
  • Different forged values produce different selected clients.
  • Syntax validation passes despite unsafe behavior.

Cause: The trust list covers an untrusted source, or a trusted proxy wrongly accepts client-controlled values.

Solution:

  • Remove every trust entry you can’t justify from the lab config.
  • Use exact verified proxy senders.
  • Never trust all IPv4 or IPv6 addresses.
  • Inspect the front proxy’s overwrite or append policy.
  • Repeat both direct and through-proxy negative tests.

For the loopback harness, restore trust to 127.0.0.2 only. Then repeat the request from 127.0.0.3.

Verification: An untrusted direct caller must retain its actual source as $remote_addr, whatever its claimed header says.

Also send a forged value before the real lab front proxy. The selected client must match the verified chain policy. A successful direct negative test alone doesn’t prove that policy.

Problem 4: NGINX reports an unknown directive or variable

Symptoms:

  • Validation rejects set_real_ip_from.
  • Logging rejects $realip_remote_addr.
  • The service and interactive shell report different builds.

Cause: The selected binary lacks support, or validation targets another installation.

Solution:

"$NGINX_BIN" -V 2>&1
sudo "$NGINX_BIN" -p "$LAB_DIR/" -c "$LAB_DIR/nginx.conf" -t

Compare the binary with the executable set in the existing service. Check the package vendor’s documented module or build procedure.

If $realip_remote_addr isn’t supported, stop these tests until you have supported original-peer logging. Removing that field would remove the comparison the tests depend on.

Verification: The selected binary must accept the entire audit config. Then confirm both address fields appear in a fresh log entry.

Problem 5: Access rules or rate limits behave differently

Symptoms:

  • Previously allowed requests receive 403.
  • Several clients no longer share one rate-limit bucket.
  • Headers sent upstream contain a different address.

Cause: Restoring $remote_addr changes the input used by rules that depend on client addresses.

Check allow, deny, geo, map, rate-limit keys, and upstream headers for references to $remote_addr or $binary_remote_addr. The access module and request limiting module describe those controls.

Solution: Test the existing policy with representative allowed and denied clients. The harness includes a static-file access check:

python3 "$LAB_DIR/request.py" 127.0.0.2 /allowed/ 198.51.100.23
python3 "$LAB_DIR/request.py" 127.0.0.2 /allowed/ 203.0.113.77
python3 "$LAB_DIR/request.py" 127.0.0.3 /allowed/ 198.51.100.23

sudo tail -n 3 "$LAB_DIR/logs/access.log"

Verification: With the supplied trust policy active and the static file accessible, use statuses 200, 403, and 403, respectively, as comparison targets. Investigate any difference using the access and error logs.

This checks an access-phase rule alongside logging. A response generated by an early return directive alone wouldn’t provide that evidence.

Problem 6: NGINX is correct, but the application still shows another address

Symptoms:

  • NGINX audit logs select the expected client.
  • Application logs show NGINX or another forwarding value.

Cause: NGINX address restoration and application trusted-proxy handling use separate configs.

Solution: Inspect the existing upstream headers and the application’s documented proxy policy. Check for repeated or conflicting forwarding values.

Avoid changing application authentication or adding new trust entries to make the displays agree.

Verification: Trace one lab request across NGINX and application logs. Check which address each component used and why.

Error Messages Reference

These message fragments identify the failing layer. Filenames and surrounding wording vary by build.

Message or resultMeaningAction
unknown directive "set_real_ip_from"The parser doesn’t recognize the directiveCheck the selected binary and HTTP Real IP support
unknown "realip_remote_addr" variableThe build doesn’t expose that variableVerify package support before using the audit format
"log_format" directive is not allowed hereThe directive is in the wrong contextDefine log_format inside http
bind() ... Address already in useAnother process owns the lab listenerChoose an unused loopback port and update the helper
Permission deniedA configured file or directory can’t be accessedInspect ownership, traversal permissions, and the exact path
test is successfulConfig validation passedContinue with positive and negative behavior tests
broken header ... while reading PROXY protocolThe listener expected a PROXY-protocol preambleRestore the previous listener unless that transport is intentional

PROXY protocol is a separate connection-level mechanism. Adding proxy_protocol to a listener doesn’t fix an HTTP forwarding-header mismatch. Both ends must support the intended transport. The official PROXY protocol guide explains the setup.

Linux-Specific Checks

Package paths and service commands

Ubuntu, Debian, and other Linux packages can use different includes, service definitions, and compiled paths. Find them in the installed service definition and effective config.

Keep the standalone lab commands separate from service commands. The explicit -p and -c arguments select the lab instance and its PID file.

Containers and translated addresses

A container deployment can present a bridge or translated source address to NGINX. Compare the audit peer with the expected proxy sender.

Don’t trust an entire container subnet just because the proxy lives there. Other workloads may share it. Stop if you can’t establish who can open connections from the observed sender address.

File access

If the lab logs a permission error, inspect the named path. Don’t disable a mandatory access-control policy to make the test pass.

Use a vendor-approved lab path and policy where required. Keep the same separate config, log, and PID paths.

Configuration Mistakes to Check

SettingCorrect interpretationCommon mistake
set_real_ip_fromIdentifies trusted suppliers of replacement addressesListing client networks
real_ip_headerSelects the header actually suppliedAssuming X-Forwarded-For is the default
real_ip_recursiveControls selection through the verified chainEnabling it without mapping intermediaries
$remote_addrSelected working client addressTreating it as the original connection peer
$realip_remote_addrOriginal peer where supportedOmitting it from diagnostics
access_logUses the chosen format in the applicable contextReading a different server’s log

The Real IP documentation allows these directives in http, server, or location contexts. Check the scopes and includes that apply before adding another copy.

For a verified single proxy supplying X-Real-IP, use that header explicitly:

# Inside the isolated lab server block.
# Replace the documentation address with the verified sender.
set_real_ip_from 192.0.2.10;
real_ip_header X-Real-IP;
real_ip_recursive off;

The helper above sends X-Forwarded-For. To test X-Real-IP, change its header key and verify the audit log’s xreal field. Don’t configure one header and test another.

Roll Back Before You Need To

Keep your admin session open. Restore every edited file, validate, then reload the same isolated instance:

cp -p "$LAB_DIR/nginx.conf.before" "$LAB_DIR/nginx.conf"
cp -p "$LAB_DIR/conf/realip.conf.before" "$LAB_DIR/conf/realip.conf"

sudo "$NGINX_BIN" -p "$LAB_DIR/" -c "$LAB_DIR/nginx.conf" -t &&
sudo "$NGINX_BIN" -p "$LAB_DIR/" -c "$LAB_DIR/nginx.conf" -s reload

python3 "$LAB_DIR/request.py" 127.0.0.2 /rollback-check 198.51.100.23
sudo tail -n 1 "$LAB_DIR/logs/access.log"

After the baseline configuration is active again, check for client=127.0.0.2 and peer=127.0.0.2. Confirm that the header remains visible while the baseline trusts no sender to supply a replacement address.

Rehearse this rollback in the lab. A backup file alone doesn’t prove recovery works.

To stop only the isolated instance gracefully:

sudo "$NGINX_BIN" -p "$LAB_DIR/" -c "$LAB_DIR/nginx.conf" -s quit

Retain its logs and config until you’ve reviewed the results.

Getting Help

Start with the paths configured by error_log and access_log. This harness uses:

LAB_DIR/logs/error.log
LAB_DIR/logs/access.log

Here, LAB_DIR means the directory printed during setup. Find existing service paths in that service’s effective config.

Prepare a redacted set of diagnostic details containing:

  • Exact OS, package version, vendor, and binary path.
  • Relevant nginx -V build arguments.
  • Applicable trust directives and log format.
  • The actual connection peer and received forwarding chain.
  • Paired trusted and untrusted results.
  • Validation output and reload errors.

Use your package vendor’s support channel for package or build questions. NGINX’s official site lists its community and support channels.

Pause if the forwarding chain remains unknown or an untrusted sender passes the spoofing test. Stop for unexpected changes to address-based controls too.

Prevention Tips

  • Keep exact proxy senders and their header policies documented together.
  • Review trust entries whenever proxies, containers, or routing change.
  • Preserve original-peer logging where supported.
  • Repeat negative tests after proxy or NGINX updates.
  • Check vendor support and security advisories before package changes.
  • Retain backups and rehearse recovery with the same binary and config path.

I’d keep the paired spoofing tests even for a one-proxy lab. Syntax validation catches parser errors. It can’t establish who deserves trust.

Wrapping Up

NGINX can restore the client address once you’ve verified the connecting proxy and forwarding chain. I’d favor exact senders and explicit header settings, even when the default happens to match.

StepActionApplies To
1Map peers and header handlingEvery forwarding chain
2Verify package and module supportThe installed binary
3Log selected client and original peerDiagnosis
4Configure exact trust and selectionVerified proxies
5Run positive, negative, and access testsThe disposable lab
6Rehearse rollback and repeat checks after restartRecovery and persistence

After restarting the isolated instance, repeat the trusted, untrusted, and access-rule requests. Confirm that NGINX restores the intended client and keeps the original peer visible. Forged headers from an untrusted source must still fail.

Sources