Results 1 to 1 of 1
I have a CentOS box (lets call it Server). When ServerA receives data on ports 1001 to 1003 it should send it to ServerB which is accessed via VPN through ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 07-03-2011 #1
- Join Date
- Jul 2011
- Calgary, AB
TCP Port Relay for CentOS?
I have a CentOS box (lets call it Server). When ServerA receives data on ports 1001 to 1003 it should send it to ServerB which is accessed via VPN through the gateway to which ServerA is connected.
I tried using Socat to do this but when I try to make a connection Socat says there is no route to host(?) even though I can SSH into ServerB from ServerA.
Can someone suggest a way to do this?
I got it partially to work using SSH forwarding on ServerA and socat on ServerB. Keep in mind I do have SSH access to ServerA from ServerB.
On ServerA entered the following SSH command:
ssh -g -L localip:localport:remoteip:remoteport
On ServerB entered the following socat command
socat TCP-LISTEN:listeningport,fork TCP:destinationip:destinationport
Current issue: after about an hour the SSH forwarders from ServerA stopped working. Killed the SSH processes and re-entered the commands and the connections are working again.
Last edited by omber; 07-04-2011 at 03:54 AM. Reason: Partial solution found