# Can traefik be a proxy for ldap connection

**URL:** <https://community.traefik.io/t/can-traefik-be-a-proxy-for-ldap-connection/10147>\
**Category:** Traefik v2\
**Tags:** tcp, kubernetes-ingress\
**Created:** [March 23, 2021, 9:19am UTC](https://community.traefik.io/t/can-traefik-be-a-proxy-for-ldap-connection/10147 "2021-03-23T09:19:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![obeyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/obeyler/32/1558_2.png) [@obeyler](https://community.traefik.io/u/obeyler)\
**Post date:** [March 23, 2021, 9:19am UTC](https://community.traefik.io/t/can-traefik-be-a-proxy-for-ldap-connection/10147/1 "2021-03-23T09:19:06Z")

</div>

Is it possible to use traefik ingresscontroller to route on a specific entrypoint 389 to reach an openldap service?  
Usually for TCP connection I use IngressRouteTCP but IngressRouteTCP uses HostSNI and in this case 389 is not an ssl endpoint.

---

<div class="post-metadata">

**Author:** ![jakubhajek](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/jakubhajek/32/3389_2.png) [@jakubhajek](https://community.traefik.io/u/jakubhajek)\
**Post date:** [March 23, 2021, 1:07pm UTC](https://community.traefik.io/t/can-traefik-be-a-proxy-for-ldap-connection/10147/2 "2021-03-23T13:07:55Z")

</div>

Hello @obeyler

You can create a dedicated TCP entry point that can bind to any port e.g 389 and then create the following IngressRouteTCP configuration:

```auto
kind: IngressRouteTCP
metadata:
  name: ingressroutetcpwhoami
spec:
  entryPoints:
    - tcp
  routes:
    - match: HostSNI(`*`)
      services:
        - name: whoami-svc-tcp
          port: 8080

```

I've just successfully tested that configuration with the sample app `whoami-tcp`.  
Hope that helps.

---

<div class="post-metadata">

**Author:** ![obeyler](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/obeyler/32/1558_2.png) [@obeyler](https://community.traefik.io/u/obeyler)\
**Post date:** [March 23, 2021, 1:09pm UTC](https://community.traefik.io/t/can-traefik-be-a-proxy-for-ldap-connection/10147/3 "2021-03-23T13:09:32Z")

</div>

Many Thanks Jakubhajek!!!
