# Rancher agent behind proxy

**URL:** <https://forums.suse.com/t/rancher-agent-behind-proxy/179>\
**Category:** Rancher 1.x\
**Created:** [July 29, 2015, 1:12pm UTC](https://forums.suse.com/t/rancher-agent-behind-proxy/179 "2015-07-29T13:12:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaos](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/kaos/32/38_2.png) [@kaos](https://forums.suse.com/u/kaos)\
**Post date:** [July 29, 2015, 1:12pm UTC](https://forums.suse.com/t/rancher-agent-behind-proxy/179/1 "2015-07-29T13:12:45Z")

</div>

Hi,

My test setup runs behind a proxy, so I use a command like this to add a host to my rancher setup:

```
docker run -d --privileged -e "http_proxy=proxy.host:8888" -e "https_proxy=proxy.host:8888" -e "NO_PROXY=" -v /var/run/docker.sock:/var/run/docker.sock rancher/agent:v0.7.11 http://rancher.server.host:8000/v1/scripts/022e74084.....0e4147e82e16d

```

Which works fine, except that all containers on that host get a Host IP pointing at the ip of the proxy.host machine, rather than the agent machine. I need the proxy for the agent to be able to download content from the internet, but apart from that, I don’t want it to use the proxy…

---

<div class="post-metadata">

**Author:** ![cjellick](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/cjellick/32/2876_2.png) [@cjellick](https://forums.suse.com/u/cjellick)\
**Post date:** [July 29, 2015, 3:39pm UTC](https://forums.suse.com/t/rancher-agent-behind-proxy/179/2 "2015-07-29T15:39:59Z")

</div>

@kaos -e NO\_PROXY should be set to your loopback IP and the domain/IP over which the hosts connect back to rancher. In other words, it should be set to 127.0.0.1 and the host that is in the url at the end of your docker run command.

In your example, it should be set as:  
`-e NO_PROXY='127.0.0.1,rancher.server.host'`

Hope this helps. Let us know if it doesn’t.

---

<div class="post-metadata">

**Author:** ![kaos](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/kaos/32/38_2.png) [@kaos](https://forums.suse.com/u/kaos)\
**Post date:** [July 30, 2015, 7:14am UTC](https://forums.suse.com/t/rancher-agent-behind-proxy/179/3 "2015-07-30T07:14:56Z")

</div>

Thank you @cjellick, it was the missing piece of information I needed.

Now, I still have some issues with ports, but that is for another topic (and for me to do some more research/testing first).

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [July 30, 2015, 4:03pm UTC](https://forums.suse.com/t/rancher-agent-behind-proxy/179/4 "2015-07-30T16:03:33Z")

</div>


