Jellyfin Forum
SOLVED: Unable to connect to Jellyfin on the same network, using remote DNS entry - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: SOLVED: Unable to connect to Jellyfin on the same network, using remote DNS entry (/t-solved-unable-to-connect-to-jellyfin-on-the-same-network-using-remote-dns-entry)



Unable to connect to Jellyfin on the same network, using remote DNS entry - omnigamer - 2023-09-08

Hi all, got a bit of a headscratcher here:

I've set up my Jellyfin instance, put it behind a reverse proxy (caddy) and I have a DNS entry setup to point to my server so I can easily access it from outside the local network. To get it to play nicely with some other web servers running on the same computer, I have enabled the baseUrl functionality giving it a suffix of /jellyfin.

When I:
connect locally, by directly using the local IP address of the server (e.g., 192.168.1.3:8096/jellyfin) it works perfectly.
connect remotely, on a different network, by using the FQDN (e.g., mydomain.com/jellyfin) it works perfectly. Due to this I don't think the issue is with the reverse proxy setup

However, when I connect locally by using the same FQDN (e.g., mydomain.com/jellyfin), it does not work. The browser directs me to a "server selection" screen, and when I select my server, I get a message "We're unable to connect to the selected server right now. Please ensure it is running and try again.". When I look into the developer console, I can see that the call to https://mydomain.com/jellyfin/system/info/public succeeds. The only potentially concerning thing in that response is that it returns back in the LocalAddress field, a value similar to, http://192.168.1.3:8096/jellyfin (but going to this URL directly works fine). In the console logs, I see the following message: "http request succeeded, but found a different server Id than what was expected"

I'd really like to get this working so that I can use the remote URL of mydomain.com/jellyfin anywhere I go, especially on my mobile devices.

Thanks!


RE: Unable to connect to Jellyfin on the same network, using remote DNS entry - TheDreadPirate - 2023-09-08

Check if your router supports NAT loopback/NAT hairpin and enable it. The router will loop back all requests to your domain since the address resolves to itself instead of your requests going out to the Internet.

Also try incognito mode and see if it still happens.

I will do some testing when I get home later tonight.


RE: Unable to connect to Jellyfin on the same network, using remote DNS entry - omnigamer - 2023-09-09

So my router doesn't support NAT loopback or hairpin. But I found this reddit post https://www.reddit.com/r/jellyfin/comments/sgcjad/cant_access_jellyfin_server_using_reverseproxy/ which mentions you could also set up a local DNS server to solve this issue. I had done that before with no real luck, but it turns out that doing that, combined with using incognito mode, actually did end up solving the issue.

For full transparency, what I did was set up BIND on a server in my network, set up a zone where I defined mydomain.com to have an A record for 192.168.1.3, and then had my BIND DNS server use recursion for all other requests, forwarding to Google's DNS servers. From there, since I can't define a DNS server for my router, I just have anything that I want to connect to jellyfin with, use my locally defined DNS server when they are on my home network.

Now I can connect over the FQDN on my local network. I've got a separate issue now that I think has to do with my reverse proxy, but I'll dive into that myself and if I can't figure it out I'll post back here.