(E-Mail Removed) (Matthew Lincoln) writes:
> On a Linux system I want to do the following:
>
> I want to listen on port 2345 for incoming requests from Internet.
> When a request is arriving it should be (unchanged) taken and "forwarded"
> to another computer with IP 123.456.123.456 and port 6789
>
> I think this scenario is a kind of simplified proxy plus port forwarding.
>
> How can I achieve this?
Here's one way, anyway: from the internal host, ssh to the
internet-facing host and set up a reverse tunnel for 2345 to go to the
internal host's 6789:
host_123.456.123.456 $ ssh -R2345:127.0.0.1:6789 user@thatinternetfacingserverip
man ssh() and look at -R
You'll need to do some monkeying with teh internet server's
sshd_config file to get port 6789 to open on the external interface
rather than just on its loopback. Bonus here is that the traffic is
forwarded over a secure tunnel if that's of any use to ya.
--
Todd H.
http://www.toddh.net/