# Reverse-proxy to external host

**URL:** <https://community.traefik.io/t/reverse-proxy-to-external-host/1417>\
**Category:** Traefik v2\
**Tags:** docker-swarm, middleware, docker\
**Created:** [September 1, 2019, 8:24pm UTC](https://community.traefik.io/t/reverse-proxy-to-external-host/1417 "2019-09-01T20:24:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomwassing](https://avatars.discourse-cdn.com/v4/letter/t/a9adbd/32.png) [@tomwassing](https://community.traefik.io/u/tomwassing)\
**Post date:** [September 1, 2019, 8:24pm UTC](https://community.traefik.io/t/reverse-proxy-to-external-host/1417/1 "2019-09-01T20:24:39Z")

</div>

I would like to forward every request to the host '[sentry.example.com](http://sentry.example.com)' with authentication to a external URL, without using redirection. The service is not directly available in my cluster and can only be reached externally. Is this possible to Traefik v2.0? If so how can I configure this using docker and on which service do I have to configure the routes?

Example:

sentry[dot]example[dot]com --\> [https://xxxxxx@sentry](https://xxxxxx@sentry)[dot]io/xxxxxx  
sentry[dot]example[dot]com/test?q=1 --\> xxxxxx@sentry[dot]io/xxxxxx/test?q=1

---

<div class="post-metadata">

**Author:** ![trajano](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/trajano/32/247_2.png) [@trajano](https://community.traefik.io/u/trajano)\
**Post date:** [September 5, 2019, 3:56pm UTC](https://community.traefik.io/t/reverse-proxy-to-external-host/1417/2 "2019-09-05T15:56:05Z")

</div>

create a service using `socat` and apply the AddHeaders middleware to add the `Authorization` header.

```auto
  foo:
    image: alpine/socat
    command: tcp-listen:8080,fork,reuseaddr tcp:sentry.example.com8080
    deploy:
      labels:
         ...

```
