My ISP provides me IPv6 with /56 prefix delegation, say for example:
d568:40fd:487:1665::/56
Each of my devices have the IPv4 and IPv6 assigned by a Unifi UDM SE router with DHCPv4/6. Since I need to access IPv6 only websites, I cannot disable IPv6 on my network.
If I insert into LAN Networks 192.168.0.0/16,d568:40fd:487:1665::/56 and play a video into browser or Apple TV, it will play as Remote, not as Local. Into logs, I see the following error:
It also does not makes sense to me that you have enabled by default the Server support for IPv6 option, if you cannot use IPv6 into LAN Networks? Thank you for your help.
With nothing defined in LAN Networks, when I play a video on my web browser, it shows as Remote into Plex Dashboard while using an IPv6 address. Since each device has both addresses assigned by router, I would expect Plex to use the IPv4 address.
Thank you for looking into this, Iām sure others will find the info useful also. While you look into this, Iāll disable temporarily IPv6 and report back if web player shows a local IPv4 in Dashboard.
So I did more troubleshooting, I created a network where only IPv4s are allowed and moved the Apple TV into it. Iāve set the Internet Streaming to 4Mbps 720p and started playing a 1080p video. To my surprise my ISP public IPv4 was displayed as Remote into Dashboard!
Then I realized I have remote access disabled and using a custom server access URL https://plex.domain.com which points to my ISP public IP and gets redirected with a port forwarding to the local Plex server.
Next, I added the ISP public IP and local network into LAN Networks but even if the video was playing as Local, it was still transcoding. Obviously, I cannot add the ISP public IP into List of IP addresses and networks that are allowed without auth, everyone would be able to access the Plex server, if they know the URL.
That being said, this exercise was a nice discovery. Because I use a custom server URL, I will never be able to have private IPs in use. I will revert back to previous setup with dual IPv4s and IPv6s, leave LAN Networks empty and the set the Internet Streaming to Maximum into Apple TV client.
If anyone has a better solution, Iām interested. Using a local http://plex.lan custom URL will not work, since it needs to be public and reachable by Plex servers. I only allow port 443 to be accessible to the world, behind a Cloudflare proxy cache (to protect my ISP public IPv4 and IPv6). With current setup, I can access anywhere in the world my Plex library.
That wonāt happen if the IP is a routable (i.e. public) IP.
Not true.
I have put my public IP into the ācustom URLā field. Still I am able to stream directly from the server when using a client in the local network.
My assumption is that your local DNS resolver is applying āDNS rebinding protectionā. This prevents secure connections from working in the local network. The solution is to add the domain plex.direct to the list of exceptions from that protection.
The information is correct, I posted it in case someone else has the same issue. Thank you, I did not know about this setting.
Edit: Enabling private-domain: plex.direct in Unbound invalidates the Custom server access URL setting and my server libraries are not available anymore in either app.plex.tv or my Apple TV app. I use a real https://plex.domain.com domain with valid certificates.
Unfortunatey I am out of ideas. If I had to guess, it is somehow connected to your highly customized routing and the involvement of several filters and proxies.
The addition of the private-domain: plex.direct directive has only an effect on the local network.
It should have no effect whatsoever on your custom server access URL. (Unless you have a very funky routing.)
I have a standard Cloudflare setup with traffic forwarded to a local server, nothing funky about it. If I disable IPv6, I see my remote IPv4, instead of a local IP. Which in my books is not right. I use a Custom server access URL because I do not want port 32400 exposed to the world.
Also, in app.plex.tv my server displays as secure.
Thanks for sharing, I have the same setup, except the Unifi UDM SE and port forwarding is done to a Raspberry Pi with Nginx Proxy managing various sites, one of them being the connection to Plex:
upstream plex {
server uranus.lan:32400;
}
server {
listen 80;
listen [::]:80;
server_name plex.lan;
index index.html;
root /usr/share/nginx/html;
include /etc/nginx/conf.d/proxy.inc;
location / {
proxy_pass http://plex;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name plex.domain.com;
index index.html;
root /usr/share/nginx/html;
include /etc/nginx/conf.d/*.inc;
location / {
proxy_pass http://plex;
}
}
Even when I access plex.lan, I get this log entry:
Request came in with unrecognized domain / IP 'plex.lan' in header Host; treating as non-local