All requests seems to come from with proxy device

Hi there,
On a big bare metal server, I launch several LXD containers to host different websites.

Http “routing” (domain1 to container1, domain2 to container2, etc) is made by NGINX which is also hosted in a LXD container (named proxy).

Ports 80 and 443 are redirected to my proxy container using proxy device.

 lxc config device add proxy myport443 proxy listen=tcp: connect=tcp:
 lxc config device add proxy myport80 proxy listen=tcp: connect=tcp:

My concern is about source IP seen by my web servers.
Every request is logged with IP, is there a configuration to have the real client IP ?


That’s pretty normal behavior for a proxy, but you can either not have this be a proxy by using the nat config key (but may not work with all network setups) or use the proxy_protocol option combined with the matching nginx plugin to have nginx log the right address.