• Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below
  • Forum
  • Website
  • GitHub
  • Status
  • Translation
  • Features
  • Team
  • Rules
  • Help
  • Feeds
User Links
  • Login
  • Register
  • Login Register
    Login
    Username/Email:
    Password:
    Or login with a social network below

    Useful Links Forum Website GitHub Status Translation Features Team Rules Help Feeds
    Jellyfin Forum Support General Questions Reverse proxy not working for new PC?

    Pages (2): 1 2 Next »

     
    • 0 Vote(s) - 0 Average

    Reverse proxy not working for new PC?

    4r5hw45twh
    Offline

    Member

    Posts: 132
    Threads: 31
    Joined: 2024 Mar
    Reputation: 0
    #1
    2024-09-27, 10:49 PM (This post was last modified: 2024-09-27, 10:54 PM by 4r5hw45twh. Edited 2 times in total.)
    So, I bought a new BeeLink N100 mini PC. My entire setup worked just fine, except now I have a different IP on this device, and I now cannot access it from the Internet. I have my own domain name pointing to a VPS IP. From there, it uses Caddyfile on Linux to point to my actual home public IP. So, none of that would've changed (right?). What did change was my device IP, so I added the new IP to my port forwarding on my router and saved, but no luck. I can access JF within the same network, but now I can't through my domain name/reverse proxy. Please help. I've checked everything like 7 times and I cannot see what would be wrong. The mini PC is *not* on a VPN or anything either. Mini PC is on Windows 10.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #2
    2024-09-28, 01:02 AM
    Did you open the firewall on the mini PC? Set the network type to private?
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    4r5hw45twh
    Offline

    Member

    Posts: 132
    Threads: 31
    Joined: 2024 Mar
    Reputation: 0
    #3
    2024-09-28, 11:19 AM (This post was last modified: 2024-09-28, 12:01 PM by 4r5hw45twh. Edited 2 times in total.)
    (2024-09-28, 01:02 AM)TheDreadPirate Wrote: Did you open the firewall on the mini PC?  Set the network type to private?

    Hey, so I figured out the initial question of my own reverse proxy, but now I am dabbling with CloudFlare.

    I pointed my domain's name servers to CloudFlare. It's now active. I added my subdomain to the DNS record and pointed it to my home public IP. Left Caddyfile the same by using my own domain name and keeping the IP as 127.0.0.1:8096 since I'm self-hosting all of it now.

    Is this correctly done? Because I cannot connect to JF from outside network again now. And yes, I know about the TOS.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #4
    2024-09-28, 04:41 PM (This post was last modified: 2024-09-28, 04:41 PM by TheDreadPirate.)
    You can use cloudflare as long as you turn off proxying and set it to DNS only. There is nothing gained with proxying. No one is going to DDoS a random person's Jellyfin server. CF proxying and tunneling just adds a lot of headache.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    4r5hw45twh
    Offline

    Member

    Posts: 132
    Threads: 31
    Joined: 2024 Mar
    Reputation: 0
    #5
    2024-09-28, 06:04 PM (This post was last modified: 2024-09-28, 07:05 PM by 4r5hw45twh. Edited 1 time in total.)
    (2024-09-28, 04:41 PM)TheDreadPirate Wrote: You can use cloudflare as long as you turn off proxying and set it to DNS only.  There is nothing gained with proxying.  No one is going to DDoS a random person's Jellyfin server.  CF proxying and tunneling just adds a lot of headache.

    I mean, maybe not. But I will be using my server for hosting multiple things on subdomains. If I just reverse proxy on the server, my public home IP is exposed, which I don't want. Hence, why I am trying CloudFlare.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #6
    2024-09-28, 06:29 PM
    You can proxy the other services, no problem. It's Jellyfin that's the issue. Serving video through their proxy is against their ToS and you risk losing your account and domain.

    Setup fail2ban, use https, keep everything up-to-date, use wildcard certs. I regularly look through my fail2ban and nginx logs and everything is just script kiddies looking for unpatched windows machines and unpatched routers.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    4r5hw45twh
    Offline

    Member

    Posts: 132
    Threads: 31
    Joined: 2024 Mar
    Reputation: 0
    #7
    2024-09-28, 07:04 PM (This post was last modified: 2024-09-28, 07:06 PM by 4r5hw45twh. Edited 2 times in total.)
    (2024-09-28, 06:29 PM)TheDreadPirate Wrote: You can proxy the other services, no problem.  It's Jellyfin that's the issue.  Serving video through their proxy is against their ToS and you risk losing your account and domain.

    Setup fail2ban, use https, keep everything up-to-date, use wildcard certs.  I regularly look through my fail2ban and nginx logs and everything is just script kiddies looking for unpatched windows machines and unpatched routers.

    Hmm. Ok, so what is the best way to go about having everything be proxied via reverse proxy + Cloudflare while ignoring JF for that? For what it's worth, I'm fine losing the domain (registered with another company) and account terminated on CF. This is all just to test and whatnot anyway. In fact, just purchased a new domain name for this.
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #8
    2024-09-28, 07:12 PM
    You can have separate subdomains in cloudflare with different settings for each subdomain.

    You'd have an A and/or AAAA record that point to your domain and public IP. Then a bunch of cnames for each subdomain that point to your domain.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    4r5hw45twh
    Offline

    Member

    Posts: 132
    Threads: 31
    Joined: 2024 Mar
    Reputation: 0
    #9
    2024-09-28, 07:55 PM (This post was last modified: 2024-09-28, 08:28 PM by 4r5hw45twh. Edited 8 times in total.)
    (2024-09-28, 07:12 PM)TheDreadPirate Wrote: You can have separate subdomains in cloudflare with different settings for each subdomain.

    You'd have an A and/or AAAA record that point to your domain and public IP.  Then a bunch of cnames for each subdomain that point to your domain.

    "...that point to your domain." Do you mean from my domain? Like, an A record from my subdomain that points to my public home IP?

    On CloudFlare, I setup a tunnel for JF and it auto-added the subdomain I picked for it as a CNAME. My 2 A records currently are: "mydomain.com" and "www" and those hostnames are pointed to my domain registrar's DNS IP (I saw the URL they were set to on my domain host before activating CloudFlare with it and then used Dig to get the actual ipv4 of those). All 3 show as Proxied.

    When testing a test subdomain that is NOT being proxied by CF, I have the A record of "test.domain.com" with it pointed to my home public IP and then I launch Caddy in PowerShell, but I can't connect from outside the network. My Caddyfile is:
    Code:
    test4.mydomain.com
    reverse_proxy 127.0.0.1:8096

    I run "caddy run" and my Caddy PowerShell window then says:
    Code:
    PS C:\Program Files\caddy> caddy run
    2024/09/28 20:27:08.056 ←[34mINFO←[0m   using adjacent Caddyfile
    2024/09/28 20:27:08.058 ←[34mINFO←[0m   adapted config to JSON  {"adapter": "caddyfile"}
    2024/09/28 20:27:08.058 ←[33mWARN←[0m   Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies    {"adapter": "caddyfile", "file": "Caddyfile", "line": 3}
    2024/09/28 20:27:08.067 ←[34mINFO←[0m   admin   admin endpoint started  {"address": "localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//127.0.0.1:2019"]}
    2024/09/28 20:27:08.067 ←[34mINFO←[0m   tls.cache.maintenance   started background certificate maintenance      {"cache": "0xc00051b580"}
    2024/09/28 20:27:08.067 ←[34mINFO←[0m   http.auto_https server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS {"server_name": "srv0", "https_port": 443}
    2024/09/28 20:27:08.067 ←[34mINFO←[0m   http.auto_https enabling automatic HTTP->HTTPS redirects        {"server_name": "srv0"}
    2024/09/28 20:27:08.068 ←[34mINFO←[0m   http.log        server running  {"name": "remaining_auto_https_redirects", "protocols": ["h1", "h2", "h3"]}
    2024/09/28 20:27:08.068 ←[34mINFO←[0m   http    enabling HTTP/3 listener        {"addr": ":443"}
    2024/09/28 20:27:08.069 ←[34mINFO←[0m   http.log        server running  {"name": "srv0", "protocols": ["h1", "h2", "h3"]}
    2024/09/28 20:27:08.069 ←[34mINFO←[0m   http    enabling automatic TLS certificate management   {"domains": ["test4.mydomain.com"]}
    2024/09/28 20:27:08.070 ←[34mINFO←[0m   tls     storage cleaning happened too recently; skipping for now        {"storage": "FileStorage:C:\\Users\\User\\AppData\\Roaming\\Caddy", "instance": "e6987cf2-53af-4c05-af72-8246f1a18f9b", "try_again": "2024/09/29 20:27:08.070", "try_again_in": 86400}
    2024/09/28 20:27:08.070 ←[34mINFO←[0m   tls     finished cleaning storage units
    2024/09/28 20:27:08.071 ←[34mINFO←[0m   autosaved config (load with --resume flag)      {"file": "C:\\Users\\User\\AppData\\Roaming\\Caddy\\autosave.json"}
    2024/09/28 20:27:08.071 ←[34mINFO←[0m   serving initial configuration
    TheDreadPirate
    Offline

    Community Moderator

    Posts: 15,374
    Threads: 10
    Joined: 2023 Jun
    Reputation: 460
    Country:United States
    #10
    2024-09-29, 12:04 AM (This post was last modified: 2024-09-29, 12:06 AM by TheDreadPirate. Edited 2 times in total.)
    Negatory.  Subdomain CNAMEs can point to domain names. They can also be a completely different IPs.

       

    "jellyfin" is a cname that points to my domain.  So jellyfin.domain.tld would resolve to my public IP. This allows you to have multiple services listening on the same port since the reverse proxy would direct traffic to the proper destination based on the subdomain used.  This also allows you to change how Cloudflare handles each subdomain.  Whether DNS only or proxying.  If you used subPATHs you wouldn't be able to do this.  Like domain.tld/jellyfin.
    Jellyfin 10.10.7 (Docker)
    Ubuntu 24.04.2 LTS w/HWE
    Intel i3 12100
    Intel Arc A380
    OS drive - SK Hynix P41 1TB
    Storage
        4x WD Red Pro 6TB CMR in RAIDZ1
    [Image: GitHub%20Sponsors-grey?logo=github]
    Pages (2): 1 2 Next »

    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)


    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    Home · Team · Help · Contact
    © Designed by D&D - Powered by MyBB
    L


    Jellyfin

    The Free Software Media System

    Linear Mode
    Threaded Mode