Jellyfin, how to totally disable HTTP access

  • Hi everyone,

    I have a fully functional Jellyfin container accessible via LAN or via VPN.


    I need to have a friend use Jellyfin securely so I installed Swag following this guide setting up a DuckDNS domain.


    I can log in but it's not clear to me if the connection is really secure, let me explain better.


    On the router I have enabled port forwarding of ports 80 and 443 on the related 81 and 444 of my Jellyfin server. In Jellyfin settings I have enabled HTTPS.

    The problem is that through the Jellyfin client I can add the server both via the HTTP or HTTPS address. Jellyfin standard ports 8096 and 8920 are blocked on my router and are not configured on its container (removed ports section).


    How can I verify that the connection is actually secure when my friend enters his username and password?

    Is it possible to completely disable HTTP access, preventing friends from connecting inadvertently by writing HTTP (instead of HTTPS) in the Jellyfin client address?


    Sorry but I know next to nothing about reverse proxy, swag etc. and therefore it is not clear to me how an HTTP connection can be secure for the simple use of swag

    • Official Post

    I would never open port 80 and 81 on your router since they are http.

    omv 8.5.11-1 synchrony | 7.0 proxmox kernel

    plugins:

    omvextrasorg 8.0.3 | kvm 8.3.4 | compose 8.2.2 | cterm 8.0.4 | borgbackup 8.2.1 | tempmon 8.0.5 |

    mergerfs 8.0.2 | scripts 8.0.6 | writecache 8.3.0 | backup 8.1 | kernel 8.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I would never open port 80 and 81 on your router since they are http.

    Port 80 is now closed on my router, only 443 to Jellyfin server port 444 is forwarded.


    On Swag 80:81 port map is commented but I can set Jellyfin server on Jellyfin client using HTTP link. See screenshots

  • This client access Jellyfin from your local network? Jellyfin can be accessed by http and https in the local Network.


    If you want to verify if only https is working from the internet connection use a Mobil device like you’re smart phone without WiFi and connection and use mobile data for the internet connection. If you can connect only with https then it is all fine.

  • If you want to verify if only https is working from the internet connection use a Mobil device like you’re smart phone without WiFi and connection and use mobile data for the internet connection. If you can connect only with https then it is all fine.

    This is what I did, Jellyfin screenshot comes from my smartphone (using mobile data connection) and I used HTTP link in the app, see this screenshot

  • Is there a configuration that redirects http requests to https for the Jellyfin website? This could be an explanation.


    In screenshot 1.jpeg port 81:80 is disabled, in screenshot 2.jpeg port 80 is used for the swag configuration. There seems to be something wrong with the swag configuration. Normally it should only use https like 1.jpeg configuration, but 2.jpeg shows 80 and 444:443.


    We need more specific information for support. Can you post your compose file of Swag and Jellyfin?

    Also the file /path_to_config_swag/nginx/proxy-confs/jellyfin.subdomain.conf


  • Is there a configuration that redirects http requests to https for the Jellyfin website? This could be an explanation.


    In screenshot 1.jpeg port 81:80 is disabled, in screenshot 2.jpeg port 80 is used for the swag configuration. There seems to be something wrong with the swag configuration. Normally it should only use https like 1.jpeg configuration, but 2.jpeg shows 80 and 444:443.


    We need more specific information for support. Can you post your compose file of Swag and Jellyfin?

    Also the file /path_to_config_swag/nginx/proxy-confs/jellyfin.subdomain.conf

    I see port 80 on Swag, but as you see it is not configured.

    This is Jellyfin compose file:

    where <my_disk_uuid> is the uuid of my HDD, and this is Swag one:

    where <my_domain> is my Duck DNS domain.


    Finally this is Swag configuration for Jellyfin:


    Thanks

  • The 2 compose files and the config file look fine. Swag only uses the https ports 444:443 in the compose file and the upstream uses the http port 8096 to Jellyfin. With this configuration only https will run from the internet.


    What is swag doing. From the router it gets the HTTPS (444:443) request and forwarded it as a http (8096) to the Jellyfin server.

    the source is: | hostname = jellyfin.* | Port = 443 | Protocoll = HTTPS |
    the destination is: | hostname = jellyfin (localhos) | Port = 8046 | Protocoll = HTTP |

    In this case the Let’s Encrypt certificate will be managed automatically by the reverse proxy. You don’t have to interact with Jellyfin in terms of certificates at all. It will all be handled on the reverse proxy side. SWAG and Jellyfin are working correctly. In this scenario only https://jellyfin.* must be possible for connection from the internet to the Jellyfin server.


    But this don't xplain why you can connect with http://jellyfin.* Maybe something is wrong on the router or the forwarding. You wrote:

    Jellyfin standard ports 8096 and 8920 are blocked on my router and are not configured on its container (removed ports section).I don't know what router/firewall you are using, but normally ports aren't blocked, they are opened to forward port traffic to internal devices. Maybe you can show the configuration or a screenshot of the router conf.


    I don't use swag as reverse proxy with Jellyfin. I have a self signed certificate on Jellyfin and have opened only the Jellyfin https Port 8920 on the router. So that only https connection from the outside will be passed to the Jellyfin webside. Maybe this a option for you it the issue can' be fixed.

  • Many thanks for the extended explanation.


    Today I’ll try to login with a fake account in order to not pass valid username and password using HTTP, I didn’t try to perform the login with my real account.


    Maybe application show HTTP but internally the connection was redirected to HTTPS or maybe it doesn’t perform the login and the login screen is shown by the application itself without a real communication with the server, I’ll try!


    My router is a FritzBox and by default forwarding should be locked

    • Official Post

    Sorry but I know next to nothing about reverse proxy, swag etc. and therefore it is not clear to me how an HTTP connection can be secure for the simple use of swag

    Any connection from outside your network through a domain and a proxy (like swag in this case) will be encrypted. This is regardless of whether you can access that service via http on your local network.

  • Maybe application show HTTP but internally the connection was redirected to HTTPS

    If you have only opened the https port on the Fritz!Box (FB). Then only https connection will be accepted on the FB WAN port, forwarded to the Swag reverse proxy, Swag to the upstream to Jellyfin on the http port. Jellyfin answer on the http request and send out http, Swag will get the http and forward https to FB, FB send https out.


    Have you configuration like the 2 screenshot? Have you set something like "Independent Port Sharing" or "Open this device completely for internet sharing via xxx (exposed host)". is your configuration for IP4, IP6 or both.


    I'm asking because I'm confused now and the router port setting and your setting in the Swag compose file are not clear to me. Can you please post the 2 screenshot from the FB for "permit Access"


    Code
                - VALIDATION=http
    ...
    ports:      - 444:443      
                #- 81:80 #optional 


    In the first post you wrote:

    Code
    On the router I have enabled port forwarding of ports 80 and 443


    Any connection from outside your network through a domain and a proxy (like swag in this case) will be encrypted. This is regardless of whether you can access that service via http on your local network.

    This is correct if you have only configured https port for forwarding. Swag is a reverse proxy and can handle http and https connection from the internet it belongs to the configuration you do.



    • Official Post

    This is correct if you have only configured https port for forwarding. Swag is a reverse proxy and can handle http and https connection from the internet it belongs to the configuration you do.

    Exactly, it wouldn't make sense to do it any other way. In any case the configuration within Jellyfin is irrelevant. The important configuration is the proxy.

  • Just a remark:

    When using a DNS validation (namely duckdns), you only need to open the 443 port.

    No need to open the unsecure port 80

  • Have you configuration like the 2 screenshot? Have you set something like "Independent Port Sharing" or "Open this device completely for internet sharing via xxx (exposed host)". is your configuration for IP4, IP6 or both.

    Here you are the requested screenshots. Redirection of port 80 was removed after first post.


    Maybe some of you doesn't understand correctly the problem.


    Jellyfin, Swag and my router seem correctly configured, see all screenshots/configurations from previous and current post BUT the problem is that with the iOS Jellyfin client I can login to the server using HTTP link: why?


    If it is Swag that redirects to HTTPS is ok but in which way can I verify this? Some logs?


    Many thanks

  • Maybe some of you doesn't understand correctly the problem.


    Jellyfin, Swag and my router seem correctly configured, see all screenshots/configurations from previous and current post BUT the problem is that with the iOS Jellyfin client I can login to the server using HTTP link: why?


    The screenshots looks OK. There is any security leak with the connection. I have set up a SWAG container and tested with Jellyfin. You can use the http connection in the app. The htpp will be redirected to https. In the app you see only http. Tested in a browser you can see that the http address is redirected to https.


    You are asking for a tool to check it. You can use WireShark on your device or tcpdump on the server. With this tools you capture the network traffic and check if there connection are encrypted or not.

  • You can use this tcpdump -n port 80

    Tried, it seems that no traffic is present during streaming on port 80 so I was correct when I wrote this:


    If it is Swag that redirects to HTTPS is ok...

    The interesting thing is that with my wife's mobile network provider I cannot access the server using the HTTP link, with my provider I can but there is no traffic on port 80/81 while there is traffic on port 444 (that was redirected from external 443).

    So the browser actually shows the redirect changing the link with HTTPS, the application has this lack and it seems that the connection is made in HTTP without encryption.


    Thanks for your help and for understanding the question

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!