Re: ssh tunnel




kristian skrev:
Jeremiah DeWitt Weiner skrev:
kristian <kristian@xxxxxxxxxxxxxx> wrote:
Hi all
I have a computer, let's call it FOO, with two nic's (10.0.0.254 and
192.168.0.254) and another, BAR, with one nic (192.168.0.32).

I want connections on i.e port 10001 on FOO to be forwarded to port
10000 on BAR. (Connections from both nic's)

On FOO I try:

# ssh -f -N -g -L 10001:192.168.0.254:10000 192.168.0.32

At least part of your problem is that your syntax for the -L option
is incorrect. The "host" part of the option is supposed to be the
_remote_ host, where connections will be forwarded _to_, and you're
using the IP of FOO. If you want connections to be forwarded to BAR,
use the address of BAR. I'm not sure that that's the root of the
problem here, but it is something you'll need to fix.

Thank you.

I'm rather new to this, so bear with me...

If the remote host goes in the -L option, does it also go as the
mandatory hostname option to ssh? like # ssh -f -N -g -L
10001:192.168.0.32:10000 192.168.0.32

It is ssh that listens to the ports listed in netstat, my failed
attempts... But I kill those processes, so nobody is listening before I
start ssh., and still get the
bind: Address already in use error.

Seems like
# ssh -f -N -g -L 10001:192.168.0.32:10000 192.168.0.32
did the job...

I still get the error when I start it, but the forwarding works.

K

.



Relevant Pages

  • Re: ssh tunnel
    ... using the IP of FOO. ... If you want connections to be forwarded to BAR, ... so nobody is listening before I ...
    (comp.os.linux.networking)
  • Re: ssh tunnel
    ... using the IP of FOO. ... If you want connections to be forwarded to BAR, ... Your netstat output shows you already have something listening to ...
    (comp.os.linux.networking)
  • Re: Insert with response
    ... FooBar, there's no way and no need to put them in synch. ... column in the foo table to 250 calumns in the bar table. ... set statistics time off ...
    (microsoft.public.sqlserver.programming)
  • Re: Magic function
    ... processing objects created in root at depth 3 ... root obj2 at depth 3 ... processing objects created in foo at depth 2 ... processing objects created in bar at depth 0 ...
    (comp.lang.python)
  • Re: from __future__ import absolute_import ?
    ... foo not in bar ... Unfortunately this is a side effect of using the os's directory structure to represent a python "package" structure. ...
    (comp.lang.python)