Jellyfin Forum
Everything works perfectly until my IPv6 address changes - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+---- Forum: Networking & Access (https://forum.jellyfin.org/f-networking-access)
+---- Thread: Everything works perfectly until my IPv6 address changes (/t-everything-works-perfectly-until-my-ipv6-address-changes)



Everything works perfectly until my IPv6 address changes - JustinH - 2025-02-07

I'm running Jellyfin on Debian, not using docker.
My ISP uses CGNAT so I'm using IPv6 only(having IPv4 and IPv6 enabled caused the local discovery address to show as 127.0.0.1) and have a DNS name redirecting to it.
I'm using caddy for HTTPS and the DNS automatically updates.

Everything works perfectly except my IPv6 address changes every 24hrs and while my DNS name updates correctly (I can remote in using it from local and external), Jellyfin stops working(both locally and externally). If I restart the Jellyfin service, it starts working again.

I don't know if it's possible or advisable to set a static IPv6 address(I still don't fully understand them), but it seems like Jellyfin should be able to deal with a changing IP address, so that seems like a bit of a band aid solution if it's even an option.
I'm vaguely aware of something to do with Jellyfin binding to an ip address, so I've been kind of looking in that area but I'm a bit lost.


RE: Everything works perfectly until my IPv6 address changes - TheDreadPirate - 2025-02-07

How are you handling IPv6? Is your ISP giving you a /64 prefix that is static, but the suffix is changing every 24 hours on the server?


RE: Everything works perfectly until my IPv6 address changes - JustinH - 2025-02-07

That's exactly it. I have the subdomain website managing the IP addresses I think. I don't know what device decides the lease time, but it seems that even with a longer lease time the same thing would happen. I have a Google wifi router so I'm fairly limited with settings I can pay with in that.


RE: Everything works perfectly until my IPv6 address changes - TheDreadPirate - 2025-02-07

Non-server versions of Windows and Linux will rotate IPv6 addresses. As will Android and iOS. This is a privacy related function to make it harder for advertisers to track you.

On server versions of Windows and Linux this is disabled. But you should be able to disable it in Debian desktop variants with these steps.

Run this command.

Code:
sudo /sbin/sysctl -a | grep use_tempaddr

The output will look something like this.

Code:
net.ipv6.conf.all.use_tempaddr = 2
net.ipv6.conf.default.use_tempaddr = 2
net.ipv6.conf.docker0.use_tempaddr = 2
net.ipv6.conf.eth0.use_tempaddr = 0
net.ipv6.conf.lo.use_tempaddr = -1
net.ipv6.conf.wg0.use_tempaddr = -1

We only care about the line for the actual interface connected to the Internet (eth0 in my case). This is from one of my servers, but if it were 1 or 2 we would edit /etc/sysctl.conf and add a line setting it to zero.

Code:
sudo vim /etc/sysctl.conf  # or whichever text editor you like

Add this to the bottom of the file. Substitute "eth0" with your interface name, if it is different.

Code:
net.ipv6.conf.eth0.use_tempaddr = 0

To apply these changes without rebooting, run this command.

Code:
sysctl --system