I have a quick question regarding Linux port forwarding to an ssh tunnel. A ssh (reverse) tunnel connected to a web service on one machine is terminated on one machine, such that the service is available on localhost:40001 on the terminating host. This works !

If I connect from an application on the terminating machine to localhost:40001 I can access the web service. But now I want to move the application from that local machine to another machine, whilst keeping the tunnel to the terminator.

I now have to either use a (web) proxy on the terminator, or forward all traffic to (and from)the application through the tunnel terminating machine to localhost:40001 on that box.

So what firewall (iptables) rules should I apply here to get this rolling ?

thanks ! Rudi


This has nothing to do with iptables unless you already have iptables enabled in restricted mode (default DROP). If so, you just need to allow the needed ports through your server/firewall.

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.