6

I have this problem. There is an udp video stream accessible only on the local network, but I need to access it outside of the network. I have Linux machine (multiple actually) with root access.

There is a small utility that makes the stream accessible on the local machine on port 1234.

./ping -h streamserver -p 1234

If I run it I can access the stream using vlc or mplayer.

mplayer udp://@:1234
vlc udp://@:1234

Now, I'm trying to create a port foward from my remote machine and access the port, but it is failing.

ssh me@machine -L 1234:127.0.0.1:1234

Any tips what I'm doing wrong?

Šimon Tóth
  • 1,434
  • See this similar question:http://superuser.com/questions/53103/udp-traffic-through-ssh-tunnel – heavyd Feb 28 '11 at 11:44

1 Answers1

5

The problem here is that SSH is only capable of port forwarding TCP connections. The protocol you are interested in is UDP.

This article: http://zarb.org/~gc/html/udp-in-ssh-tunneling.html shows one method (using DNS as the example) around the problem by encapsulating the UDP in TCP first.

Majenko
  • 32,428
  • Hmm. I still can't get it working. I make the ssh tunel: ssh me@machine -L 6666:127.0.0.1:6666. Then I run socat on the remote machine: socat tcp4-listen:6666,reuseaddr,fork UDP:127.0.0.1:1234 and then on local socat -T15 udp4-recvfrom:1234,reuseaddr,fork tcp:127.0.0.1:6666 – Šimon Tóth Feb 28 '11 at 12:02