Sponsored Content
Special Forums IP Networking Proxy Server WebSocket over SSH tunnel - is it possible? Post 302931498 by Vladislav on Tuesday 13th of January 2015 11:13:10 AM
Old 01-13-2015
The setup is quite simple actually - there is a WebSocket server and a WebSocket client connecting to it.

My idea is to be able to indirectly access the WebSocket server by forwarding it's listening port to a machine with a real IP address. (in the case when the server is behind a router or firewall and using standard NAT forwarding / routing is not an option - e.g. on two devices accessing the Internet through a mobile data connection)

The problem is that the WebSocket client will always allocate a random port when initializing the communication and the SSH-relay point has no idea how to handle the responses coming from the server on that port.

What makes it even worse is that SSH will open yet another TCP socket (again on a random port) which will be then used to forward the client's request to the actual WebSocket server over the SSH tunnel.
So, if I want to make this work I will have to build a second SSH tunnel from the WebSocket client, in an attempt to bridge the SSH generated client socket to the original one, which makes this a somewhat complicated task...
 

10 More Discussions You Might Find Interesting

1. Programming

using a ssh tunnel with nx compression

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

ssh decipher a tunnel

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

Stopping SSH tunnel

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

ssh tunnel with 2 hops and key

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

RDP over SSH Tunnel

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

SSH tunnel working for ssh but not for sshfs

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

Help with SSH tunnel?

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

Ssh tunnel question

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

Tunnel X over ssh for 11.3

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

Tunnel using SSH

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
libroar(7)						System Manager's Manual: RoarAuido						libroar(7)

NAME
libroar - RoarAudio sound library SYNOPSIS
#include <roaraudio.h> DESCRIPTION
libroar is a central library used to comunicate with RoarAudio servers. It supports all commands from simple commands to play some audio up to complex commands to controll the server and do nice things over the network. It also includes several useful functions from buffer mangement to IO abstraction. EXAMPLES
The basic tools shiped with RoarAudio are designed to also work as examples for the lib. You may start by looking at roarcat(1)s source code as an example on how to simply play back some audio. A more complex example is roarvorbis(1) which also includes meta data updates. You should also have a look at VS API, see roarvs(7) for a overview. TUTORIALS
Tutorials can be found in roartut(7). ENVIRONMENT VARIABLES
The following variables are used in libroar itself so they are common to all clients using libroar. HOME The users home directory. ROAR_SERVER The address of the listening server. This may be in form of host:port for TCP/IP connections and /path/to/sock for UNIX Domain Sock- ets. If a value of '+fork' is given a roard is forked and used. This roard will not listen on any sockets so it is used exclusiv by this client. See roard(1) for more information. ROAR_PROXY Set the type of the proxy being used to connect to the server. Valid values are 'socks4', 'socks4a', 'socks4d', 'http' and 'ssh' for the moment. You can add type depending options in form 'type/opts'. socks_proxy The SOCKS4/4a/4d/5 proxy to use in form [user@]host[:port]. Default port is 9050. http_proxy, https_proxy The HTTP/HTTPS Proxy server. This server needs to understand the CONNECT request type. Give the server name in this format: [http://]host[:port][/] The default port is 8080. ssh_proxy The remote host to use as SSH Proxy server. Give the server name in this format: [user@]host[:port] The default port is 22. Note that you may need to use publickey based auth or ssh-agent because the application may start SSH in a non interactive environment and SSH can not ask you for a password. FILES
/etc/roarserver This is a symlink to the server socket. If all types of server addresses are supported. Example: ln -s /tmp/roar /etc/roarserver ln -s somehost /etc/roarserver ln -s mynode:: /etc/roarserver BUGS
A lot... SEE ALSO
roar-config(1), roartypes(1), roarvs(7), roartut(7), roard(1), roartips(7), RoarAudio(7). HISTORY
See RoarAudio(7). RoarAudio June 2011 libroar(7)
All times are GMT -4. The time now is 02:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy