What's the best way to forward traffic on a specific port to another machine?

Posted by Ankit on Server Fault See other posts from Server Fault or by Ankit
Published on 2012-10-18T03:27:41Z Indexed on 2012/10/18 5:07 UTC
Read the original article Hit count: 138

The setup I have is this:

[client01] <-A-> [server01] <-B-> [server02]

client01 can access port 9300 on server01 (connection A). server01 can access port 9300 on server02 (connection B). What's the best way to make all traffic on port 9300 to server01 go to port 9300 on server02?

I can successfully do this with an ssh tunnel from client01 to server01 to server02, but I don't want to have to run ssh on client01. When I ssh from server01 to server02 forwarding port 9300 (ssh -g -L9300:localhost:9300 server02 on server01), it doesn't work -- am I using the wrong command?

© Server Fault or respective owner

Related posts about linux

Related posts about networking