Why Zammad needs to know the real client IP behind trusted proxies
A production Zammad rarely receives traffic directly from customers and agents. It usually sits behind a reverse proxy, a load balancer or a Docker network, and without further configuration the application sees the address of that intermediary instead of the address of the person making the request. The setting that controls this is RAILS_TRUSTED_PROXIES, which tells Zammad which upstream addresses it may trust when it reads client IP information from forwarded headers. If your installation has any proxy in front of it, this decision applies to you, whether the proxy is Nginx, Apache, a cloud load balancer or a container gateway.
The decision matters because several Zammad behaviors depend on a correct client address, including rate limiting and the location recorded for a session. If every request appears to come from the same internal address, one busy customer or a credential-stuffing run can affect everyone, and session records stop helping an administrator judge whether a login was unusual. Treat RAILS_TRUSTED_PROXIES as a deliberate allowlist, not a catch-all. Trusting too broadly lets a client forge the address Zammad logs, while trusting too narrowly leaves the application blind to the real source. Before you set it, list every hop between the internet or your internal users and the Zammad application container, and confirm with your proxy and container platform documentation which address each hop presents.
This topic is one hardening decision within the wider Zammad hardening group, and it interacts with the session, two-factor and audit controls covered elsewhere in that group. The Zammad environment variables reference is the right next read for the exact format the setting accepts. Ask your network team to confirm the proxy addresses in each environment, because Docker setups can show the network gateway address instead of the proxy address when the proxy runs on another network. Record the expected addresses in your change documentation so that a later infrastructure change does not silently break client IP detection.
How a request reaches Zammad through proxies
A client request starts at the browser and passes through a load balancer or reverse proxy, which may sit behind a Docker network gateway before it reaches the Zammad application. Each hop rewrites the source address Zammad sees, so the trusted proxy list in RAILS_TRUSTED_PROXIES decides which upstream addresses Zammad believes when it reads the client IP. Check that the proxy's address as Zammad sees it matches the list, especially when the proxy runs in a different Docker network.
Request path from client to Zammad, with the trust boundary at the application.
Configuration options for RAILS_TRUSTED_PROXIES and when each fits
This table compares the ways to scope RAILS_TRUSTED_PROXIES, from a single proxy address to wider network ranges. Read each row for the setup it suits, the spoofing risk of trusting too much, and the item to confirm in the environment variables documentation before you choose.
| Option | When it fits | Main risk | Confirm before you choose |
|---|---|---|---|
| Single proxy address | One reverse proxy or load balancer node with a fixed, known internal IP address | Breaks silently if the proxy is replaced, scaled out or gets a new address, so client IPs stop being read correctly | The exact accepted format for listing addresses in the variable and whether it takes a single IP |
| Subnet covering the proxy tier | Several proxy instances in a dedicated subnet that only proxies use, with no application or user traffic in that range | Any host placed in the same subnet later can send requests that Zammad treats as coming from a trusted proxy | Whether the variable accepts CIDR notation and how the range is written in your deployment |
| Docker network range including the gateway | Proxy runs in another Docker network, so Zammad sees the gateway IP instead of the proxy address | The range may include other containers on the same bridge, so a compromised container could forge client addresses | Which gateway IP your Docker network assigns and whether it changes after a daemon or network restart |
| Load balancer address list | Managed or clustered load balancers with several fixed addresses that you can enumerate | Missing an address leaves real client IPs unread, and a stale list keeps trusting addresses no longer owned by the balancer | Whether the provider publishes stable addresses or whether they can change without notice |
| Trust no proxy (default behavior) | Zammad is reached directly with no intermediary, or the proxy is not yet configured | Features that rely on client IPs record the proxy address instead of the user's address | Whether your deployment has any intermediary in front of Zammad before you leave the variable unset |
How to set trusted proxies in a production Zammad
This sequence maps every hop between clients and Zammad, sets RAILS_TRUSTED_PROXIES to match that path, and confirms with a test request that Zammad records the client address you expect.
Inventory every hop before changing anything
List each component a client request passes through before it reaches the Zammad application: external load balancer, TLS terminator, reverse proxy such as Nginx or Apache, container ingress, and any internal gateway. Note which host runs each hop, which network it sits on, and whether it forwards the client address in a header. Your platform or network team should own this list, and the output is a written diagram that the security and application owners both sign off on. Zammad's own requirements list Nginx or Apache as the supported reverse proxy, so confirm which one you run before you record it.
Identify the addresses each hop uses
For each hop, record the source address that Zammad will actually see on its connection, not the public address of the client. In Docker setups, this is often the network gateway address rather than the proxy container's own IP, because the traffic crosses a bridge network before it reaches the application. Check the container network settings or run a short inspection on the host to confirm each address. The result is a table that maps each proxy to the single IP or CIDR range Zammad will receive from it.
Set RAILS_TRUSTED_PROXIES in the deployment configuration
Add the RAILS_TRUSTED_PROXIES environment variable to the Zammad deployment, using the addresses from the previous step. Keep the list limited to the proxies you operate, and avoid broad ranges that include clients or unrelated tenants. Set the value in the same place as other environment settings for your install method, such as the Docker Compose environment file or the Helm values, so that it survives redeploys. Confirm the variable name and accepted format in Zammad's environment variable documentation before you write it.
Restart the Zammad services
Restart the Zammad application processes and any workers that read the environment so the new value takes effect. In a multi-instance deployment, restart every node and not only the first, because a node that keeps the old value will log different client addresses than its peers. Check that all services report healthy after the restart and that the web interface loads through the proxy. The step is complete when every instance has been restarted with the new configuration and is serving requests.
Verify with a test request from a known source
Send a request from a workstation or test host whose address you know, through the same path real users take, and find the entry in Zammad's logs or the relevant admin view. Compare the logged client address with the expected source. If Zammad shows the proxy address or the Docker gateway instead, the trusted list is missing that hop. If it shows an address you did not expect from the client side, review the list for a range that is too wide. Record the test request, the expected value and the logged value as evidence.
Recheck the value after any network change
Repeat the hop inventory and address check whenever a load balancer is replaced, a proxy is moved to another network, a Docker network is recreated, or a cluster node is added. Container and cloud networks can assign new gateway or subnet addresses without any change on the Zammad side, so the trusted list can go stale silently. Schedule this check as part of the change procedure for those components, and rerun the test request afterward. The check is complete when the test request again logs the expected client address.
Record the values in change management
Store the final RAILS_TRUSTED_PROXIES value, the hop diagram, the test evidence and the owner of each proxy in your change management system or configuration repository. Link the record to the Zammad deployment so that anyone who changes the proxy, network or deployment file must review it. This record is what lets an auditor or incident responder confirm that logged client addresses can be trusted, and it gives the next reviewer a starting point when the network changes.
Which Zammad features depend on correct client IP detection
Several Zammad security controls record or act on the address that made a request. When the application only sees the load balancer or Docker gateway address, these controls keep running but judge every request as coming from the same place. Confirm each dependency in the version you run before you rely on it.
Failed login rate limiting
Zammad limits repeated failed logins to slow password guessing. If the application sees only the proxy address, all users behind that proxy share one counter. One attacker's failures can block every legitimate user, while distributed guessing from many addresses goes unnoticed. After you set RAILS_TRUSTED_PROXIES, test with two clients on different networks and confirm that failures from one client do not affect the other.
Session location and active sessions
Under System, Sessions, Zammad lists active sessions with the address and location each one came from. If every session shows the proxy or gateway address, an administrator cannot tell which device or network holds a session. Session review then cannot support ending a suspicious session. Log in from two networks and confirm that each session appears with its own address before you rely on the session list during an incident.
Suspicious login alerts
Zammad's GeoIP-based alerts flag logins from unexpected locations. They work by geolocating the source address. If the proxy address is used instead, the lookup returns your own data center, so foreign or unusual logins generate no alert. Confirm that the alert feature is enabled in your version, that it uses the client address, and that its geolocation lookup is permitted by your external services policy.
Admin audit log source addresses
The admin audit log records changes made by administrators and switch-to-user sessions. Investigators use the source address to decide whether an action came from an office, a VPN or an unknown host. If the address is the proxy, the log shows that a change happened but not where it came from. Check whether the entries in your version include an address, and test one admin change from a known client to confirm the value.
Proxy and application log correlation
Incident responders usually join reverse proxy access logs with Zammad's application logs by time and client address. Zammad only sees the client address when the proxy forwards it and the application trusts that proxy. Without trusted proxies, the two log sources cannot be matched on the client address. Confirm which forwarding header your proxy sets, and check that the same client address appears in both logs during a test request.
What happens when proxy IP addresses change
A stale trusted proxy value is one of the quieter ways client detection breaks in Zammad. The RAILS_TRUSTED_PROXIES setting holds the addresses Zammad accepts as proxies, so when the proxy or gateway address changes after a container redeploy, a subnet change or a load balancer replacement, Zammad no longer recognizes the new hop. Client addresses then come through as the proxy's own address, or the gateway's, and anything keyed on the client IP, such as rate limiting and session location, starts to misbehave without an obvious error. Treat every infrastructure change that touches the proxy tier as a change that can affect Zammad's view of the client.
Changing the value is not enough on its own. Zammad reads these environment variables when the application starts, so the new value only takes effect after a restart of the application containers or services. Build that into your runbook as an explicit step: confirm the current proxy addresses from the load balancer or container network, update RAILS_TRUSTED_PROXIES in the environment file or deployment definition, restart the application, then check that a test request from a known address appears with the expected client IP in the application logs. Confirm the exact restart procedure for your install method (package, Docker Compose or Helm) in the Zammad environment variables documentation and in your own change records.
The most durable fix is to reduce how often the addresses change. Where your network allows it, give the reverse proxy and load balancer fixed addresses, or place them on a dedicated subnet so their range can be trusted without listing individual hosts that come and go. Ask your platform team whether the proxy tier can use reserved addresses in your container or virtualization platform, and whether the trusted range can be narrowed to that subnet. Keep the trusted list as tight as your topology allows, and record who owns the change so a redeploy does not quietly reintroduce the problem.
Security risks of trusting the wrong proxy addresses
Zammad uses the proxy list to decide which addresses count as the client. When that list is too broad, or when Zammad is reachable without passing through the proxy, the address Zammad records and acts on can be chosen by the requester. Each risk below has a review step you can run before and after any change to the trusted list.
Forged forwarded addresses from broad trust
If RAILS_TRUSTED_PROXIES includes ranges that clients can reach or that are wider than your load balancer, a client can send its own X-Forwarded-For header and have Zammad accept it as the origin address. Trust should cover only the specific addresses of the proxy hops you operate. Review step: list each entry in the trusted list, confirm it maps to a proxy you manage, and remove any range that is broader than that proxy needs.
Bypassing address-based controls
Rules that depend on client address, such as rate limiting, IP-based restrictions in front of admin paths, or session location checks, only work if the address Zammad sees is the real one. A spoofed address can make a blocked source look allowed or spread one attacker across many identities. Review step: after a change, send test requests from an address that should be blocked and confirm Zammad records and limits that address, not the value in a forwarded header.
Direct access that skips the proxy
A proxy only helps if it is the single way in. If the Zammad application port or the Docker network is reachable from other hosts, a client can connect straight to Zammad and send whatever forwarded headers it likes, while the team assumes the proxy filtered the traffic. Review step: confirm the application port is not published on any public or shared interface, and test from outside the proxy network that direct connections are refused.
Gateway addresses in Docker networks
In Docker setups, Zammad can see the network gateway address instead of the proxy's address when the proxy runs in a different network. If the gateway is then trusted broadly, or the real proxy is left out, logs and address-based features show the wrong origin. Review step: place the proxy and Zammad on a network you control, check the address Zammad sees for a test request, and add exactly that proxy address to the trusted list.
Misleading audit trails
When the wrong address is trusted, session records, login events and admin activity can point to the proxy or an address the attacker chose. That weakens investigations and any evidence you hand to a customer or auditor. Review step: after each proxy or trust change, compare a known login's recorded address with the address your proxy logs show, and keep the change record with the date and the entries you verified.
Proxy IP changes without review
Container and load balancer addresses can change after restarts, scaling or re-deployment. A list that was correct last month can trust the wrong host today, or stop trusting the real proxy and collapse every client into one address. Review step: keep the trusted list in version-controlled configuration, record who approved each change, and re-run the address check whenever the proxy tier is rebuilt.
Questions buyers ask about trusted proxy configuration
Can an internal team configure trusted proxies on its own?
Yes, in most environments a platform team can set RAILS_TRUSTED_PROXIES themselves, because the change is an environment variable plus a restart. The harder part is knowing which addresses to list. That requires an accurate picture of how traffic reaches Zammad: which load balancer or reverse proxy terminates connections, which Docker networks sit between them, and whether the addresses change. Teams that already own their network documentation and change process usually handle this in-house. Teams without that visibility often benefit from an outside review of the topology before the first change, so the list is correct the first time.
What drives the effort of a trusted proxy change?
The main drivers are the number of hops between the client and Zammad, the topology, and the change control around the deployment. Each proxy or load balancer layer adds addresses that may need to be trusted. A single Nginx host in front of a package install is a small task. A chain of cloud load balancers, an ingress controller and a Docker network with a gateway address is a larger one, because each layer must be traced. Change control adds time when production changes need approval, testing on a staging copy and a documented rollback.
What does the client need to provide before a change?
The client should provide a current network diagram, an addressing plan for the subnets used by proxies, load balancers and container networks, and a defined change window. The team also needs access to where the deployment is configured, such as the Docker Compose file, the Helm values or the environment file on the host. Useful additions are the reverse proxy configuration, the forwarded headers it sets, and a staging copy of Zammad for testing. Without these, the work starts with discovery, which extends the timeline.
How long does a trusted proxy change take?
The duration depends on the environment, not on the variable itself. A single-host setup with one known proxy can be verified quickly. Multi-layer cloud or Kubernetes topologies, environments where proxy IP addresses change, and organizations that need formal change approval take longer. No fixed figure applies across these cases. Ask any provider for a timeline based on your written topology and change process, and check whether it includes testing and rollback.
Does Zammad need a restart after a proxy change?
Yes. Zammad reads RAILS_TRUSTED_PROXIES at startup, so changing the value requires restarting the application containers or services. The restart should be planned, because it briefly interrupts agents and customers using the helpdesk, and it should be verified afterward by checking that the client addresses in logs and session records show the real client. If proxy IP addresses change often, for example in a dynamic container network, the restart becomes a recurring operational task, which is a reason to fix the addressing plan first.
Which Zammad features depend on correct client IP detection?
Features that use the client address, such as rate limiting, session location and suspicious login alerts, depend on this setting. If Zammad sees the proxy address instead of the client address, these features can group many users under one address or report incorrect locations. In Docker setups, Zammad may also see the network gateway address instead of the proxy's address when the proxy sits in another network. Confirm the behavior of each feature you rely on in the version you run, and test it with traffic from a known address.
What would a partner scope for a trusted proxy engagement?
A partner would typically scope a topology review, the proxy and address inventory, the change to RAILS_TRUSTED_PROXIES in your deployment method, a staging test, the production change in an agreed window, verification of client addresses in logs and dependent features, and a short handover of the addressing assumptions. The scope should state which environments are covered and what is excluded, such as the network devices themselves. DeployOpen does not publish a price list. A quote follows from the written scope, so describe your topology and change process when you ask for one.
How DeployOpen scopes trusted proxy and client IP work
DeployOpen starts by mapping the path a client request takes before it reaches Zammad. In a fixed-scope engagement, the first deliverable is a written topology of the load balancer, reverse proxy (Nginx or Apache, as documented in Zammad's software requirements), Docker networks and any ingress in your own infrastructure. For each hop, the team records which address Zammad receives, which network the proxy sits in and where the Docker gateway address appears. This review happens in your environment, against your running containers, so the scope reflects how traffic actually arrives rather than how the diagram says it should.
Next, DeployOpen sets and tests RAILS_TRUSTED_PROXIES against that map. The engagement covers the value written to the environment file or compose configuration, a check that a request from a known client shows the client address in Zammad's logs and session records, and a check that a request arriving through an unlisted address is not trusted. Where the proxy shares a network with Zammad, the team confirms the gateway behavior described in the environment variable documentation and records the result. Before handover, DeployOpen writes a restart runbook that lists which containers must be restarted after a proxy IP change, in what order, and how to verify the change afterward.
Finally, DeployOpen retests after any network change your team makes, such as a new load balancer, a changed subnet or a container platform upgrade. The retest repeats the client address checks and confirms that rate limiting and session location still reflect real clients. Ask any partner to confirm in writing which environment variables, containers and log outputs will be checked, who performs the retest after handover and whether the runbook is delivered in your repository. Those details belong in the written scope agreed before work starts.

