# SSL passthrough

**URL:** <https://community.traefik.io/t/ssl-passthrough/1880>\
**Category:** Traefik v2\
**Tags:** docker, middleware\
**Created:** [September 25, 2019, 3:41pm UTC](https://community.traefik.io/t/ssl-passthrough/1880 "2019-09-25T15:41:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yassine.laz](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/yassine.laz/32/1987_2.png) [@yassine.laz](https://community.traefik.io/u/yassine.laz)\
**Post date:** [September 25, 2019, 3:41pm UTC](https://community.traefik.io/t/ssl-passthrough/1880/1 "2019-09-25T15:41:37Z")

</div>

Hello everyone,  
First time using v2.0 of Traefik and Im wondering if anyone managed to get SSLpassthrough working. Is there an example to follow?  
Tried the 'passtlsclientcert' middleware with a single node rancher but it's not working.  
Any help or guidance is immensely appreciated.

```auto
version: '3.3'
services:
    rancher:
        image: rancher/rancher:v2.3.0-rc9
        restart: always
        networks:
            - traefik
        labels:
            - traefik.enable=true
            # rancher router
            - traefik.http.routers.rancher.entrypoints=http
            - traefik.http.routers.rancher.rule=Host(`rancher.thinkpad.tld`)
            - traefik.http.routers.rancher.middlewares=https-redirect@file
            # rancher-ssl router
            - traefik.http.routers.rancher-ssl.entrypoints=https
            #- traefik.http.routers.rancher-ssl.tls=true
            - traefik.http.routers.rancher-ssl.rule=Host(`rancher.thinkpad.tld`)
            - traefik.http.middlewares.rancher-passtlsclientcert.passtlsclientcert.pem=true
            - traefik.http.routers.rancher-ssl.middlewares=rancher-passtlsclientcert
            - traefik.http.routers.rancher-ssl.service=rancher
            # rancher service
            - traefik.http.services.rancher.loadbalancer.server.port=80
        volumes:
            - ./data:/var/lib/rancher
        container_name: 'rancher'
networks:
  traefik:
    external: true

```

---

<div class="post-metadata">

**Author:** ![yassine.laz](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/yassine.laz/32/1987_2.png) [@yassine.laz](https://community.traefik.io/u/yassine.laz)\
**Post date:** [September 26, 2019, 11:25pm UTC](https://community.traefik.io/t/ssl-passthrough/1880/2 "2019-09-26T23:25:28Z")

</div>

For anyone interested. This works with TCP routers.  
I was able to access rancher behind Traefik while using rancher's default certificates.

```auto
version: '3.3'
services:
    rancher:
        image: rancher/rancher:v2.3.0-rc9
        restart: always
        networks:
            - traefik
        labels:
            - traefik.enable=true
            # rancher router
            - traefik.tcp.routers.rancher.rule=HostSNI(`rancher.thinkpad.tld`)
            - traefik.tcp.routers.rancher.tls.passthrough=true
            - traefik.tcp.routers.rancher.service=rancher
            - traefik.tcp.services.rancher.loadbalancer.server.port=443

        volumes:
            - ./data:/var/lib/rancher
        container_name: 'rancher'

networks:
  traefik:
    external: true

```
