# allowedNetworks: hardcoded IPv4 format, even with IPv6 enabled

**URL:** <https://forums.plex.tv/t/allowednetworks-hardcoded-ipv4-format-even-with-ipv6-enabled/720498>\
**Category:** Plex Media Server\
**Tags:** server-synology, networking\
**Created:** [June 4, 2021, 4:53pm UTC](https://forums.plex.tv/t/allowednetworks-hardcoded-ipv4-format-even-with-ipv6-enabled/720498 "2021-06-04T16:53:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![bloerwald](https://avatars.discourse-cdn.com/v4/letter/b/ba9def/32.png) [@bloerwald](https://forums.plex.tv/u/bloerwald)\
**Post date:** [June 4, 2021, 4:53pm UTC](https://forums.plex.tv/t/allowednetworks-hardcoded-ipv4-format-even-with-ipv6-enabled/720498/1 "2021-06-04T16:53:01Z")

</div>

Server Version#: 1.23.2.4600  
Player Version#: — irrelevant —

In parsing of `allowedNetworks` preference, a `inet_pton (AF_INET6)` case is missing:

> ```auto
> Request: [192.168.178.34:56086 (Allowed Network (Subnet))] PUT /:/prefs?allowedNetworks=fe80%2F8 (13 live) GZIP Signed-in Token (…@googlemail.com)
> Error parsing allowedNetworks 'fe808': Invalid argument
> 
> ```

Other calls to `inet_pton` check with AF\_INET6 first, then fall back to AF\_INET if not parsed. Only

- `TreatWanIpAsLocal` parsing
- the loop `"Comparing request from %s against %s/%s"` for allowedNetworks(?)
- `allowedNetworks` parsing

call the function only with `AF_INET`.

Since IPv6 addresses do reach the server even with `EnableIPv6=0`, this implies it is impossible to allow devices that prefer IPv6.

As a side note, the exception is missing the `/` since it is replaced with a `'\0'`, which might be misleading when reading the error.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 4, 2021, 6:04pm UTC](https://forums.plex.tv/t/allowednetworks-hardcoded-ipv4-format-even-with-ipv6-enabled/720498/2 "2021-06-04T18:04:23Z")

</div>

Would you please also show what you entered in “Allowed Networks” so I may give Engineering the example of what causes the failure ?

that aside, I am almost 100% certain, IPv6 isn’t fully supported.

I know `plex.tv` has no IPv6 support. Only www.plex.tv (general web page) is IPv6 capable.

---

<div class="post-metadata">

**Author:** ![bloerwald](https://avatars.discourse-cdn.com/v4/letter/b/ba9def/32.png) [@bloerwald](https://forums.plex.tv/u/bloerwald)\
**Post date:** [June 4, 2021, 6:18pm UTC](https://forums.plex.tv/t/allowednetworks-hardcoded-ipv4-format-even-with-ipv6-enabled/720498/3 "2021-06-04T18:18:11Z")

</div>

Yeah, I don’t actually _want_ to use IPv6, but one of my devices insists and Plex seems to listen on v6 as well, not just v4, and I can’t seem to get either to stop doing that…

My input was `fe80::c73:bd9b:28a:1159` as a concrete IP and `fe80::/10` for the “all locals” range. As per [man inet\_pton](https://man7.org/linux/man-pages/man3/inet_pton.3.html) these are valid inputs for `inet_pton (AF_INET6)`:

> 1. The preferred format is x:x:x:x:x:x:x:x. This form consists of eight hexadecimal numbers, each of which expresses a 16-bit value (i.e., each x can be up to 4 hex digits).
> 2. A series of contiguous zero values in the preferred format can be abbreviated to ::. Only one instance of :: can occur in an address. For example, the loopback address 0:0:0:0:0:0:0:1 can be abbreviated as ::1. The wildcard address, consisting of all zeros, can be written as ::.
> 3. An alternate format is useful for expressing IPv4-mapped IPv6 addresses. This form is written as x:x:x:x:x:x:d.d.d.d, where the six leading XS are hexadecimal values that define the six most-significant 16-bit pieces of the address (i.e., 96 bits), and the ds express a value in dotted-decimal notation that defines the least significant 32 bits of the address. An example of such an address is ::FFFF:204.152.189.116.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 4, 2021, 6:37pm UTC](https://forums.plex.tv/t/allowednetworks-hardcoded-ipv4-format-even-with-ipv6-enabled/720498/4 "2021-06-04T18:37:13Z")

</div>

Thank you.

May I ask which Manufacturer made the device ?

---

<div class="post-metadata">

**Author:** ![bloerwald](https://avatars.discourse-cdn.com/v4/letter/b/ba9def/32.png) [@bloerwald](https://forums.plex.tv/u/bloerwald)\
**Post date:** [June 4, 2021, 8:03pm UTC](https://forums.plex.tv/t/allowednetworks-hardcoded-ipv4-format-even-with-ipv6-enabled/720498/5 "2021-06-04T20:03:59Z")

</div>

> [@ChuckPa](#):
>
> May I ask which Manufacturer made the device ?

I had issues with both Apple devices and an old cheap no-name Android tablet of a friend. I convinced the Apple one by manually configuring an empty address for IPv6, but that doesn’t sound like a real solution either…

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 4, 2021, 8:21pm UTC](https://forums.plex.tv/t/allowednetworks-hardcoded-ipv4-format-even-with-ipv6-enabled/720498/6 "2021-06-04T20:21:57Z")

</div>

I have multiple Apple devices. In fact, I have no Android.

Does your modem/router support dual-stack TCP/IP ?

Followup to that, does it support dual-stack DHCP services for the devices ?

I am asking because:

1. My Modem/router is dual stack
2. My workstation is dual stack.
3. All my home devices are RFC-1918 IPv4 (including every Apple device)

---

<div class="post-metadata">

**Author:** ![bloerwald](https://avatars.discourse-cdn.com/v4/letter/b/ba9def/32.png) [@bloerwald](https://forums.plex.tv/u/bloerwald)\
**Post date:** [June 4, 2021, 9:59pm UTC](https://forums.plex.tv/t/allowednetworks-hardcoded-ipv4-format-even-with-ipv6-enabled/720498/7 "2021-06-04T21:59:05Z")

</div>

The iOS devices seem to be defaulting to IPv4 in my setup, the iMac for some reason to IPv6, but only _sometimes_?! I had one tab logged in, using IPv4, and another (to test, incognito) using IPv6.

My setup is a “bit” of a mess. Answering your post and drawing a diagram made me realize just how bonkers it is… Thanks.

```auto
= WAN ===+==
         | (IPv6 disabled)
     FRITZ!Box 5490 (router)
         | |
= LAN ===+====== ( ===========+====================+==
         | | | |
         | | Apple Time Capsule (bridge) |
         | | | | |
= LAN 2= ( ===== ( ======+====+== | iMac
         | | | | |
         | | Synology DS920 (plex) | |
         | | | | |
= WiFi ==+====== ( ======== ( =========== ( =======?======?==
                 | | | | |
= Guest LAN ==+==========+== | | |
= Guest WiFi 1 ==+===+=================== ( =======?======?=============?==
                     | | | | |
                Apple TV gen3 | | private iOS guest/work
                                          | | | |
= Guest WiFi 2 ===========================+========?======?=============?==

```

- The FRITZ!Box does not allow configuring IPv6 for local networks if it is disabled on the WAN side.
- The issue is probably the secondary Guest WiFi I have for legacy reasons: The Time Capsule (in Bridge mode) seems to like IPv6. The TC complains if WiFi is turned off though…
- My private WiFI-capable devices randomly connect to the WiFis (since all are saved and thing are magic™), which likely is where the TC IPv6 comes into play and breaks things.

tl;dr I should probably clean this up… What the hell was I thinking. I have less complex configurations with 200+ devices at work.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 4, 2021, 10:16pm UTC](https://forums.plex.tv/t/allowednetworks-hardcoded-ipv4-format-even-with-ipv6-enabled/720498/8 "2021-06-04T22:16:24Z")

</div>

My TL;DR 🙂

I wish you luck.

Once you get that flattened out, you’ll be a lot happier.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/plex/original/3X/2/a/2acb9765406f63293d357b4ec509ec39aa28f2ad.png) [@system](https://forums.plex.tv/u/system)\
**Post date:** [September 2, 2021, 10:16pm UTC](https://forums.plex.tv/t/allowednetworks-hardcoded-ipv4-format-even-with-ipv6-enabled/720498/9 "2021-09-02T22:16:50Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
