# IpWhitelist with IPv6

**URL:** <https://community.traefik.io/t/ipwhitelist-with-ipv6/7214>\
**Category:** Traefik v2\
**Tags:** middleware, docker\
**Created:** [August 6, 2020, 11:17pm UTC](https://community.traefik.io/t/ipwhitelist-with-ipv6/7214 "2020-08-06T23:17:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![arnefm](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@arnefm](https://community.traefik.io/u/arnefm)\
**Post date:** [August 6, 2020, 11:17pm UTC](https://community.traefik.io/t/ipwhitelist-with-ipv6/7214/1 "2020-08-06T23:17:14Z")

</div>

Hello,

I have a problem using IPv6 address ranges (CIDR) in whitelists. I have tested my exact configuration using IPv4 on virtual machines and it worked perfectly, but I can't figure out how to whitelist IPv6 ranges. I've looked for hints in the documentation without any success.

Using docker-compose I've added the following label (that works)

```auto
labels:
      - ...
      - "traefik.http.middlewares.ip-whitelist.ipwhitelist.sourcerange=10.0.0.0/8"
      - ...

```

however, when trying the same thing using IPv6 ranges it doesn't work.

```auto
labels:
      - ...
      - "traefik.http.middlewares.ip-whitelist.ipwhitelist.sourcerange=1234:abcd:1234:abcd::/64"
      - ...

```

Could anyone help with with this? There's no IPv4 in my network, so this is a blocker. Any help is greatly appreciated.

---

<div class="post-metadata">

**Author:** ![coolnodje](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@coolnodje](https://community.traefik.io/u/coolnodje)\
**Post date:** [November 12, 2021, 4:28pm UTC](https://community.traefik.io/t/ipwhitelist-with-ipv6/7214/2 "2021-11-12T16:28:44Z")

</div>

I can't believe you didn't get an answer for this.  
This is really a showstopper, and I still can't find any reference on ipv6 support in the documentation...

---

<div class="post-metadata">

**Author:** ![leifnel](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/leifnel/32/2047_2.png) [@leifnel](https://community.traefik.io/u/leifnel)\
**Post date:** [January 5, 2022, 8:55pm UTC](https://community.traefik.io/t/ipwhitelist-with-ipv6/7214/3 "2022-01-05T20:55:31Z")

</div>

Perhaps this will help, it helped with getting the ipv6 in x-forwarded-for

```auto
{
  "ipv6": true,
  "fixed-cidr-v6": "fd....::/64",
  "experimental": true, 
  "ip6tables": true
 }

```
