[Feature] Add ability to set up a reverse SSH tunnel to stream RTSP #405
Replies: 1 comment
-
@alienatedsec With some help of claude.ai, I managed to write a hopefully bullet-proof bash script, for the tunnel. It uses SSH to create a reverse-tunnel to example.com on port 2222, exposing port 554 to 10001. I was thinking, maybe there could be a setting in the UI, to expose rtsp (554), web (80) and ssh (22) this way, so the camera is accessible from everywhere outside the network. I've already tested it with Frigate NVR and it works flawlessly. Usage
start-tunnel.sh
|
Beta Was this translation helpful? Give feedback.
-
I can't believe what I just accomplished, and I'm so proud to share with you guys.
I searched for a way for the yicam to push its RTSP stream to frigate instead of frigate pulling from the cam.
After days of headache and asking claudeai and chatgpt, and a bit of googling, I finally found the solution, which was simple, but hard enough for someone with limited networking knowledge.
/This will allow you to place the yicam in your parents house in one city, and publish its RTSP stream to your self-hosted frigate server elsewhere.
So, first of all, the cam needs a loopback network interface with 127.0.0.1 as IP.
Finally, with an ssh reverse tunnel, the RTSP stream can be forwarded to any machine.
The machine that accepts the tunnel, needs the following config in /etc/ssh/sshd_config
While this might sound like a security desaster at first, I think it can be accomplished with some strongly restricted docker-containers that expose the SSH port publicly.
I was thinking, that maybe this could be implemented in the next version of yi-hack, where the loopback device is created automatically, while the SSH address can be configured via UI.
Beta Was this translation helpful? Give feedback.
All reactions