1

I have a program that wants to connect to 1.2.3.4 on port 5678, but it can't because the port is blocked on our network. However, I do have an SSH tunnel set up that redirects localhost:5678 to 1.2.3.4:5678.

How do I redirect all traffic to/from 1.2.3.4:5678 so that it actually goes through localhost:5678?

I don't want all traffic to/from a specific port to be redirected, nor do I want all traffic to/from 1.2.3.4 to go to localhost, just this specific port and IP combination.

0

I think balance http://www.inlab.de/balance.html is a good option for your use case

Though its main purpose is a balancing, it can be used for just traffic redirection on specific port

balance SOMEPORT anotherhost:SOMEOTHERPORT

will forward all connection to SOMEPORT to anotherhost:SOMEOTHERPORT

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.