# Errors - Using traefik ip whitelist middleware in annotation

**URL:** <https://forums.suse.com/t/errors-using-traefik-ip-whitelist-middleware-in-annotation/19327>\
**Category:** SUSE Rancher Prime\
**Created:** [January 20, 2021, 6:06am UTC](https://forums.suse.com/t/errors-using-traefik-ip-whitelist-middleware-in-annotation/19327 "2021-01-20T06:06:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![weiyentan](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/weiyentan/32/6794_2.png) [@weiyentan](https://forums.suse.com/u/weiyentan)\
**Post date:** [January 20, 2021, 6:06am UTC](https://forums.suse.com/t/errors-using-traefik-ip-whitelist-middleware-in-annotation/19327/1 "2021-01-20T06:06:46Z")

</div>

Hi , I am trying to use the whitelist annotation option in rancher key value pair like so in the deployment

traefik.http.middlewares.testIPwhitelist.ipwhitelist.sourcerange = 127.0.0.1/24  
But i get the error:

Validation failed in API: Deployment.apps “nexus” is invalid: spec.template.annotations: Invalid value: “traefik.http.middlewares.testIPwhitelist.ipwhitelist.sourcerange”: name part must be no more than 63 characters.

How would one create a middleware annotation like this using Rancher? Many thanks.

---

<div class="post-metadata">

**Author:** ![Sireone](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/sireone/32/10842_2.png) [@Sireone](https://forums.suse.com/u/Sireone)\
**Post date:** [January 11, 2024, 8:30pm UTC](https://forums.suse.com/t/errors-using-traefik-ip-whitelist-middleware-in-annotation/19327/2 "2024-01-11T20:30:55Z")

</div>

> [@weiyentan](#):
>
> How would one create a middleware annotation like this using Rancher? Many thanks.

Did you ever figure this out? I’m in the same boat. Deployed Rancher via helm only to find out that the admin UI is automatically exposed via Traefik. I have IPWhitelists setup in other Traefik deployments which works perfect, just can’t seem to figure this out in Rancher.
