ssh tunnel



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

But get error
bind: Address already in use

That makes me think I have something set up to listen to port 10001
already, but nomatter what port I choose, I get the same error.

If I use netstat -na, i see the following:
# netstat -an
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address
State
tcp 0 0 0.0.0.0:111 0.0.0.0:*
LISTEN
tcp 0 0 0.0.0.0:10000 0.0.0.0:*
LISTEN
tcp 0 0 0.0.0.0:631 0.0.0.0:*
LISTEN
tcp 0 0 127.0.0.1:25 0.0.0.0:*
LISTEN
tcp 0 0 127.0.0.1:6010 0.0.0.0:*
LISTEN
tcp 0 0 127.0.0.1:6011 0.0.0.0:*
LISTEN
tcp 0 0 192.168.0.254:32851 192.168.0.32:22
ESTABLISHED
tcp 0 0 192.168.0.254:32852 192.168.0.32:22
ESTABLISHED
tcp 0 0 192.168.0.254:32853 192.168.0.32:22
ESTABLISHED
tcp 0 0 192.168.0.254:32960 192.168.0.32:22
ESTABLISHED
tcp 0 0 192.168.0.254:32959 192.168.0.32:22
ESTABLISHED
tcp 0 0 :::20000 :::*
LISTEN
tcp 0 0 :::1002 :::*
LISTEN
tcp 0 0 :::10032 :::*
LISTEN
tcp 0 0 :::22 :::*
LISTEN
tcp 0 0 :::12345 :::*
LISTEN
tcp 0 0 ::1:25 :::*
LISTEN
tcp 0 0 ::1:6010 :::*
LISTEN
tcp 0 0 ::1:6011 :::*
LISTEN

Where I have tried to listen to ports 10032, 1002, 20000, 12345. So
something is happening...

Kristian

.



Relevant Pages

  • Re: Netstat shjows "extra" connections
    ... virus yesterday. ... I was watching netstat. ... I do not see these connections anymore. ... *administrator* to help determine what is listening on that port. ...
    (microsoft.public.win2000.security)
  • how do you display incoming and outgoing connections in windows?
    ... whether I am running the server or not. ... sometimes you can tell from the port numbers - whether they are ... i'm surpised that netstat doesn't. ... and outgoing connections, logging them. ...
    (comp.security.firewalls)
  • [SLE] Netstat omitting Program Name and PID
    ... I have a database server that is being bombarded with connections. ... port using "netstat -alpn", some connections are displayed without the ... several of the connections to the DB port? ...
    (SuSE)
  • Re: active connections and associated processes
    ... > connections and their corresponding processes? ... > the -p flag to netstat and it's all shows local host, remote host, ... > port, and the PID responsible for the connection. ... Is the output of 'netstat -a' too complicated to decipher? ...
    (comp.unix.solaris)
  • Re: Need help with bandwidth management . . .
    ... also be a good time to separate the wired from the wireless parts of ... wired connections. ... QoS lan port settings, and I cannot get anything consistent. ... switch ports and limit the bandwidth per port (the settings are ...
    (alt.internet.wireless)