01-13-2015
WebSocket over SSH tunnel - is it possible?
Hello,
I have a video streaming application that utilizes a WebSocket for the server <-> client communication. My goal is to make the video streaming service available over the internet in the cases where neither the server nor client have public IPs.
One way to do this is over a VPN connection, but I prefer not to use a VPN at all. That's why I decided to try and forward the communication over an SSH server via remote port forwarding.
However I am facing an issue - forwarding the server socket is pretty straight-forward, but I have no way to know in advance what the randomly allocated client port will be, so the traffic will flow only in the direction client -> SSH server -> streaming server.
When the SSH relay point receives the responses from the streaming server it does not automatically route them back to the client and the WebSocket handshake cannot be completed.
Do you think it is possible to overcome this issue or should I drop the WebSocket altogether and revert to a normal HTTP / TCP connection?
Thanks!
10 More Discussions You Might Find Interesting
1. Programming
hi everybody and thank you for this wondefrul forum
this is my first thread posted here and i hope that i could find some help from your part (i am even sure) :D
here is the situation: i am to develop an application of remote desktop access such as vnc, vpn and especially nx
i want to develop... (0 Replies)
Discussion started by: bolboln01
0 Replies
2. UNIX for Advanced & Expert Users
Two question here, but it's only one on the protocol point of view.
If two persons use the same key to connect to a SSH server is there a risk they can decipher the other tunnel. In other terms is that less safe than if they have two separate keys.
Same question if two persons use the same user... (2 Replies)
Discussion started by: moi
2 Replies
3. UNIX for Advanced & Expert Users
I have initiated a tunnel for vncserver. now i want to stop it. is there any way except sleep option? (2 Replies)
Discussion started by: majid.merkava
2 Replies
4. IP Networking
I have situation:
- localhost L
- server A
- server B (currently accessible only from B, but it have key of my localhost - added when L have different location and can access directly to B)
problem:
how set tunnel from L to B and use key from localhost (I don't remember password to B)?
I... (0 Replies)
Discussion started by: lessmore
0 Replies
5. Cybersecurity
Hi all,
I'm trying have an alternative way of connecting into a Corporate network. Mostly in case the VPN down as I cannot also change the security policy.
I want to expose windows RDP over ssh tunnel.
I have 3 hosts in my scenario
1- Host a : Windows 2k8 has no internet access just only an... (3 Replies)
Discussion started by: h@foorsa.biz
3 Replies
6. UNIX for Dummies Questions & Answers
I'm trying to setup a link between my home pc (work-machine) and a server at work (tar-machine) that is behind a gateway (hop-machine) and not directly accessible.
my actions:
work-machine$ ssh -L 1234:tar-machine:22 hop-machine
work-machine$ ssh -p 1234 user@127.0.0.1
- shh access on... (1 Reply)
Discussion started by: Vathau
1 Replies
7. IP Networking
I have a Java web app on machine (X) that needs to talk to an LDAP server (Y) on :636, but the LDAP server is only accessible on a particular network.
I can login to a machine (Z) on that network from X, and this machine can talk to the LDAP server on :636.
How can I tunnel so that X can... (2 Replies)
Discussion started by: spacegoose
2 Replies
8. UNIX for Advanced & Expert Users
Hi all
I have a suite of scripts that ssh to remote servers within a cluster and run some tests. This is done from a central server so that all of the test results can be captured in one location.
Problem is I now have 509 tests and the number is growing. The scripts work by establishing a... (2 Replies)
Discussion started by: steadyonabix
2 Replies
9. Solaris
Hello Solaris experts:
Trying to bring the 11.3 gdm screen over ssh to a Linux Box:
I did the following:
1. made chanes to /etc/ssh/sshd_config & bounced ssh daemon:
# X11 tunneling options
X11Forwarding yes
X11DisplayOffset 10
X11UseLocalhost yes
2. From the remote Linux box:
... (6 Replies)
Discussion started by: delphys
6 Replies
10. UNIX for Advanced & Expert Users
I am not clear with the part of concept of Tunneling using ssh.
ssh -f -N -L 1029 192.168.1.47:25 james@192.168.1.47
I found out that above code works for me . but didn't quite well understood how ti works and need to ask you guys some questions.
since we are using tunnel through ssh ... (2 Replies)
Discussion started by: lobsang
2 Replies
LEARN ABOUT CENTOS
rstream
RSTREAM(1) librdmacm RSTREAM(1)
NAME
rstream - streaming over RDMA ping-pong test.
SYNOPSIS
rstream [-s server_address] [-b bind_address] [-B buffer_size]
[-I iterations] [-C transfer_count]
[-S transfer_size] [-p server_port] [-T test_option]
DESCRIPTION
Uses the streaming over RDMA protocol (rsocket) to connect and exchange data between a client and server application.
OPTIONS
-s server_address
The network name or IP address of the server system listening for connections. The used name or address must route over an RDMA
device. This option must be specified by the client.
-b bind_address
The local network address to bind to.
-B buffer_size
Indicates the size of the send and receive network buffers.
-I iterations
The number of times that the specified number of messages will be exchanged between the client and server. (default 1000)
-C transfer_count
The number of messages to transfer from the client to the server and back again on each iteration. (default 1)
-S transfer_size
The size of each send transfer, in bytes. (default 1000) If 'all' is specified, rstream will run a series of tests of various
sizes.
-p server_port
The server's port number.
-T test_option
Specifies test parameters. Available options are:
s | socket - uses standard socket calls to transfer data
a | async - uses asynchronous operation (e.g. select / poll)
b | blocking - uses blocking calls
f | fork - fork server processing (forces -T s option)
n | nonblocking - uses non-blocking calls
v | verify - verifies data transfers
NOTES
Basic usage is to start rstream on a server system, then run rstream -s server_name on a client system. By default, rstream will run a
series of latency and bandwidth performance tests. Specifying a different iterations, transfer_count, or transfer_size will run a user
customized test using default values where none have been specified.
Because this test maps RDMA resources to userspace, users must ensure that they have available system resources and permissions. See the
libibverbs README file for additional details.
SEE ALSO
rdma_cm(7)
librdmacm 2011-11-16 RSTREAM(1)