Skip to main content

Enable PROXY protocol

Inspect 1.36

PROXY protocol makes the Hetzner load balancer pass the real client IP to your pods. Without it, every request appears to originate from the load balancer, which breaks rate limiting, WAF rules, audit logs, and any NetworkPolicy that matches on source IP.

Set it on both sides: the load balancer adds the header, and the backend reads it. If only one side is enabled, every connection breaks.

Turn it on#

Enable it at the load balancer #

Add the annotation to the type: LoadBalancer Service:

yaml
		metadata:
  annotations:
    load-balancer.hetzner.cloud/uses-proxyprotocol: "true"
	

Tell the backend to read it #

The backend side depends on what receives the connection.

Set use-proxy-protocol in the controller ConfigMap:

ingress-values.yamlyaml
		controller:
  config:
    use-proxy-protocol: "true"
	

What else it turns on#

Enabling PROXY protocol also causes the CCM to set the Service's ipMode to Proxy, which keeps a pod calling its own load balancer IP working. You do not set that yourself. See for why it matters.

Important

Enable PROXY protocol before you rely on anything that reads the client address: rate limits, a WAF, or source-IP network policies. Until both sides are set, those controls see the load balancer's address and behave as if every request came from one client.

For the wider picture, including the externalTrafficPolicy: Local alternative and how to verify what the pod sees, read .