Skip to content

Instantly share code, notes, and snippets.

@whatupfoo
Created July 28, 2020 14:18
Show Gist options
  • Save whatupfoo/2e81ad0573e4cf8b807e917d943572da to your computer and use it in GitHub Desktop.
Save whatupfoo/2e81ad0573e4cf8b807e917d943572da to your computer and use it in GitHub Desktop.
Configure AWS LB X-forward-for to Proxy

aws elb describe-load-balancers --load-balancer-name [elb-name]

aws elb create-load-balancer-policy --load-balancer-name [elb-name] --policy-name my-ProxyProtocol-policy --policy-type-name ProxyProtocolPolicyType --policy-attributes AttributeName=ProxyProtocol,AttributeValue=true

aws elb set-load-balancer-policies-for-backend-server --load-balancer-name [elb-name] --instance-port 23 --policy-names my-ProxyProtocol-policy

aws elb set-load-balancer-policies-for-backend-server --load-balancer-name [elb-name] --instance-port 81 --policy-names my-ProxyProtocol-policy

aws elb set-load-balancer-policies-for-backend-server --load-balancer-name [elb-name] --instance-port 444 --policy-names my-ProxyProtocol-policy

aws elb set-load-balancer-policies-for-backend-server --load-balancer-name [elb-name] --instance-port 8081 --policy-names my-ProxyProtocol-policy

aws elb set-load-balancer-policies-for-backend-server --load-balancer-name [elb-name] --instance-port 8444 --policy-names my-ProxyProtocol-policy

aws elb set-load-balancer-policies-for-backend-server --load-balancer-name [elb-name] --instance-port 9419 --policy-names my-ProxyProtocol-policy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment