Logging client IP address


I’m looking for some hints to log the original client IP address when external connections arrive at a published port for a swarm service.

Docker source-NATs connections to 10.255.0.x on the ingress network, so that’s what’s showing in my nginx logs.

I’m sure I can rig something up with iptables input log rules on each node but that won’t be ideal for log correlation and I’m curious what others are doing.


Got the same problem and can’t find a solution :frowning:
Here a topic about it : http://stackoverflow.com/questions/39854682/log-clients-real-ip-address-in-docker-swarm-1-12-when-accessing-a-service

the “bad” Solution is to use reverseproxy.