Proxy protocol
How is this to be understood?
Last updated
How is this to be understood?
Last updated
As already mentioned in Listen, a stream forwarded by Nginx cannot include the source IP. We help ourselves by activating the proxy protocol. As a result, the packet is taken and the information from the original IP is stored at the beginning.
As can be seen in the diagram, the stream still receives the original IP from the querying client. As soon as the stream connects to the reverse proxy, this is an internal connection with 127.0.0.1. The information is lost from the reverse proxy for the web server.
With the Proxy protocol, the reverse proxy receives the original IP with the package extension of the Proxy protocol header and can pass it on to the web server.
You can read more about it at Exploring the proxy protocol.