<div dir="ltr">Hello,<div><br></div><div>I placed nginx behind AWS NLB proxyprotocol enabled, and configured to log the client's "real" IP</div><div><br></div><div>    listen 443 ssl proxy_protocol;<br>    set_real_ip_from xxx.xxx.xxx.xxx;<br>    real_ip_header proxy_protocol;<br>    real_ip_recursive on;<br><div><div><br></div><div>and I need to verify clients certificates,</div><div>    ssl_verify_client on;<br></div><div><br></div><div>are written in my config.</div><div><br></div><div>With valid clients, i.e. with valid client certificates, the log is as expected, logged the client's real IP.</div><div>However the load balancer's address is logged when the client does not show the client certificate.</div><div><br></div><div>I expect nginx could log the real IP even if the client verification fails, because ProxyProtocol has nothing to do with client verification.</div><div>Is there anything I should check or fix my configuration, or it's a bug of nginx?</div><div><br></div><div>Note:</div><div>* I'm using nginx:1.19.3 docker image in AWS Fargate service.</div><div>* I enabled/disabled http2 in listen directive and the result was the same.</div><div>* I logged $remote_addr and $realip_remote_addr but these are the same value when client verification fails.</div><div><br></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">Tomoya KABE<br>Mail : <a href="mailto:limit.usus@gmail.com" target="_blank">limit.usus@gmail.com</a><br></div></div></div></div>