Locally, everything works fine on HTTP (http://192.168.1.222).

Externally, however, only PARTIALLY on HTTPS (https://mydomain:8344) through Caddy. I can connect to the site (first picture), but streams won’t start.

Any idea why this is the case? My theory is that the RTSP port (554) is for streaming and that when I go to the local address (that is on 80), the site ITSELF initiates a connection to port 554 in the background. However, this apparently does not happen when I connect remotely.

EDIT: In the same Caddyfile, I reverse proxy my Jellyfin server that only uses a single port, and that works fine. The Caddy server runs on my Ubuntu Server 23 on Raspberry pi 5.

  • gaylord_fartmaster@lemmy.world
    link
    fedilink
    arrow-up
    3
    ·
    2 months ago

    My theory is that the RTSP port (554) is for streaming and that when I go to the local address (that is on 80), the site ITSELF initiates a connection to port 554 in the background. However, this apparently does not happen when I connect remotely.

    I think you’re on the right track here. The DVR is probably telling your browser to connect to http://192.168.1.222:554 for the stream, which on LAN is fine because you have a route to 192.168.1.222, but when connecting externally you won’t be able to get to 192.168.1.222.

    You can probably check the network connections in dev tools in the browser to confirm that.

  • SteveTech@programming.dev
    link
    fedilink
    English
    arrow-up
    0
    ·
    2 months ago

    I really wouldn’t expose a DVR to the internet, and especially not RTSP, those sorts of things get brute forced all the time, and you can find websites full of hacked cameras.

    What I would do is run a VPN server (maybe Wireguard) on your Pi, and VPN in when you want to look at your cameras.

    • dysprosium@lemmy.dbzer0.comOP
      link
      fedilink
      arrow-up
      0
      ·
      2 months ago

      yeah but I am not exposing my DVR to the internet, right? I only expose my reverse proxy (Caddy) to the internet that is just redirecting the traffic from my DVR. You kinda make me worry as if this is still not safe enough??