Home icon
Preserving client IP address with Proxy protocol v2 and Network Load Balancer

Networking & Content Delivery Blog



This article discusses how to preserve client IP address information when using Network Load Balancer and Proxy protocol v2. It covers the following key points:

Specifically, the article covers:

  • How Proxy protocol v2 works by adding a header to the TCP stream with client connection details
  • Common use cases for Proxy protocol v2 when client IP preservation is not possible, such as with remote targets, PrivateLink, and hairpinning scenarios
  • A hands-on demonstration deploying a CloudFormation template with Network Load Balancer and Proxy protocol v2 enabled targets (NGINX or HAProxy)
  • Capturing and analyzing Proxy protocol v2 headers using a network protocol analyzer
  • Viewing web server access logs showing the client IP from the Proxy protocol v2 header


Go to article

The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.

Related articles

The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.