How can I use an SSH tunnel for all traffic from a single application, without knowing the ports used?

Posted by Matthew Read on Super User See other posts from Super User or by Matthew Read
Published on 2012-06-02T21:27:43Z Indexed on 2012/06/02 22:44 UTC
Read the original article Hit count: 270

Filed under:

I have an application that opens connections on dozens of ports, and doesn't provide documentation about which ports it uses. I could use Wireshark or something to capture the traffic and export the ports from that, but I think it should be simpler than that. (And I'm not sure I would be able to cover all use cases and ensure the app used every single port it can ever use.)

So I'm looking for a way to just say "forward all traffic from this application" (bonus points for all traffic from child processes as well) without needing to worry about specific ports. I'm sure there must be a way, but I couldn't hit on the right keywords while searching Google. How can I do this?

© Super User or respective owner

Related posts about ssh-tunnel