# Load balancer is displaying the wrong public IP

**URL:** <https://forums.suse.com/t/load-balancer-is-displaying-the-wrong-public-ip/5011>\
**Category:** Rancher 1.x\
**Created:** [December 23, 2016, 8:31pm UTC](https://forums.suse.com/t/load-balancer-is-displaying-the-wrong-public-ip/5011 "2016-12-23T20:31:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ouadie\_Benziane](https://avatars.discourse-cdn.com/v4/letter/o/e47c2d/32.png) [@Ouadie\_Benziane](https://forums.suse.com/u/Ouadie_Benziane)\
**Post date:** [December 23, 2016, 8:31pm UTC](https://forums.suse.com/t/load-balancer-is-displaying-the-wrong-public-ip/5011/1 "2016-12-23T20:31:42Z")

</div>

I’ve setup the AWS instances from a VPC to register with rancher. However when setting up the rancher LB, the public IP showing from “ports” tab is the VPC gateway IP which not possible to use that to use the container service. Does anyone have the same issue or have a solution to this ?

Thanks,

---

<div class="post-metadata">

**Author:** ![ecliptik](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/ecliptik/32/1068_2.png) [@ecliptik](https://forums.suse.com/u/ecliptik)\
**Post date:** [December 27, 2016, 7:46pm UTC](https://forums.suse.com/t/load-balancer-is-displaying-the-wrong-public-ip/5011/2 "2016-12-27T19:46:48Z")

</div>

You’ll need to pass the Private IP of the instance to the rancher-agent when you connect to the rancher master,

Here’s what we add into our AWS user-data scripts which should give you an idea,

> -e CATTLE\_AGENT\_IP=`curl http://169.254.169.254/latest/meta-data/local-ipv4`
