Get real IP when using cloudflared

Hello guys,

I’ve deployed a Zammad instance using compose and cloudflared. Everything is working as expected, except for the real IP coming to the server. Currently I got all private IP from my docker stack.

Cloudflare should forward real IP using CF-connecting-IP header, is it possibile to add as match to Zammad? May be in the nginx container?

Thanks!

What problem do you encounter? And what are you trying to do? Some use-case for context?

Hi DD4PK,

i want to see real IP on notification like this:

Subject: New Device Login Notification

Good morning stich86,

It appears that a login was made from a new device on “11/06/2025 09:32 (Europe/Rome)”:

  • Your device: Windows, Chrome
  • Your location (approximate): unknown
  • Your IP address: 172.18.0.5

The device has been added to the list of recognized devices, which you can view here:
https://XXX.XXX.com/#profile/devices

If this wasn’t you, please remove the device, change your account password, and contact the administrator. Someone might have unauthorized access to your account.

The Ticketing System Team

and may be also in sessions overview when logged as Admin.

Currently i’m getting the IP address of cloudflared container and not the real IP of the customer that access the ticketing system

It’s strange because on each http request from cloudflared, I’ve both Cf-Connecting-Ip and X-Forward-For with the right IP, but on the Zammad console (and emails) still get private one:

Thanks!

That’s a docker issue. I can’t help with that. My best guess would be to change the docker initialization script (or whatever it’s called) to run network configuration in bridged mode instead of NAT - but that’s not my area of expertise, sorry.

I don’t think it’s a solution, i will get same “private IP” and not the real one.
There is something missing on the configuration probably that prevents to read headers correctly.