3

here's my scenario:

I have IP camera behind the company firewall that I want to stream publicly, and for that, I've created two Azure VMs (Ubuntu 19.04) - let's call them vm1 and vm2

In case it's important, my VM SKU is Standard B1s (1 vcpus, 1 GiB memory)

  1. I SSH to my camera and from there, I do a remote port forwarding for RTSP like this:

    ssh -R 554:localhost:554 root@<vm1-ip>
    

    And, I guess I need to enable root SSH because it's a "well-known" port.

  2. I log in to vm1, and I see it's listening on the port: sudo netstat -tlnp gives me this:

    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 127.0.0.1:554           0.0.0.0:*               LISTEN      108748/sshd: root@p
    tcp6       0      0 ::1:554                 :::*                    LISTEN      108748/sshd: root@p
    
  3. But, when I use nmap from from vm2, the port is shown as closed:

    nmap <vm1-ip> -p 554
    
    PORT    STATE  SERVICE
    554/tcp closed rtsp
    
  4. When I use vlc to connect to the stream, it doesn't work either: the URL I use in vlc is: rtsp://<vm1-ip>/...

  5. I thought this might be an issue with the NSG (network security group) associated with vm1, so I tried allowing all inbound traffic: enter image description here and, needless to say that it doesn't solve the issue

Any thoughts on this?

Thank you

Farzad
  • 1,770
  • 4
  • 26
  • 48
  • You could potentially use `socat` to map ports on the remote host, nullifying the need for a tunnel on a reserved port. See this answer: https://unix.stackexchange.com/a/564604 – Bartosz Feb 26 '21 at 20:32

0 Answers0