Re: Port Forwarding from Remote Computer to Multiple IPs



Have you checked the ssh manpage?

---snip---
-R [bind_address:]port:host:hostport

Specifies that the given port on the remote (server) host is to be
forwarded to the given host and port on the local side. This works by
allocating a socket to listen to port on the remote
side, and whenever a connection is made to this port, the connec‐
tion is forwarded over the secure channel, and a connection is
made to host port hostport from the local machine.

Port forwardings can also be specified in the configuration file.
Privileged ports can be forwarded only when logging in as root on
the remote machine. IPv6 addresses can be specified by enclosing
the address in square braces or using an alternative syntax:
[bind_address/]host/port/hostport.

By default, the listening socket on the server will be bound to
the loopback interface only. This may be overridden by specify‐
ing a bind_address. An empty bind_address, or the address ‘*’ indicates
that the remote socket should listen on all interfaces.

Specifying a remote bind_address will only succeed if the
server’s GatewayPorts option is enabled (see sshd_config(5)).
---snip---

In addition, you can simply string multiple -R (and -L) options to
specify additional ports to forward..

HTH
~k
--

On Fri, 2009-04-24 at 10:35 -0500, Dean Shavit wrote:
I would like to be able to forward ports from remote computers to
different IP addresses on my ssh server.

For example,

I forward port 443 like so:

ssh user@xxxxxxxxxx -R 443:127.0.0.1:44300

and the server listens on:

tcp4 0 0 127.0.0.1.46312 *.*
LISTEN
tcp6 0 0 ::1.46312 *.*
LISTEN

If I turn gateway ports on, and forward like so:

ssh user@xxxxxxxxxx -R 443:server.com:44300

then netstat -an shows:

cp4 0 0 *.46312 *.* LISTEN
tcp6 0 0 *.46312 *.* LISTEN


I have multiple IP addresses on my server, and I'd like sshd to
listen like this:

cp4 0 0 10.0.0.1.46312 *.* LISTEN
tcp6 0 0 10.0.0.2.46312
*.* LISTEN

In other words, I'd like to have two ranges of ports, completely
separated (doubling the number of available ports for forwarding) on
two separate IPs.

Is this possible with OpenSSH?

If so, how does one configure it?






Relevant Pages

  • Re: Cannot telnet some ports
    ... Some with remote administration feature I believe. ... >> From a Windows 2003 Server SP2 ... >> fromn the 2k3 serrver but can telnet into any other port. ... kerberos 750/udp kdc # Kerberos udp ...
    (microsoft.public.windows.server.general)
  • RE: Remote Web Workplace not completely working.
    ... In order to allow a remote desktop connection to a client computer through ... TS requests through a firewall on TCP port 4125, ... To open the port 4125 on ISA, we can re-run CEICW to confirm it. ... server certificate) and then click Next. ...
    (microsoft.public.windows.server.sbs)
  • Re: ISA Rule for Remote Desktop?
    ... My server has a private IP address on the WAN NIC. ... I've just had an opportunity to try testing Remote Desktop through RWW from ... attempts being made from the logging interface in ISA to port 4125 when I ... There are three connection ...
    (microsoft.public.windows.server.sbs)
  • Re: Unable to Connect to Server/Client Desktop using RWW
    ... Please post the results of an ipconfig /all for the sbs server. ... I did another test after turning off the firewall on the remote. ... If port 4125 was not forwarded on the sbs machine, ...
    (microsoft.public.backoffice.smallbiz)
  • Re: Kazzaa- spyware
    ... > server, then file retrievals from your machine must be done with the ... >>- Allow all UDP for both direction, for local port 123 and remote port ... > But unfortunately RR is changing the DNS addresses all the time. ...
    (comp.security.firewalls)