ssh port redirection ?

bscott at ntisys.com bscott at ntisys.com
Wed Sep 25 15:02:09 EDT 2002


On Wed, 25 Sep 2002, at 1:53pm, plussier at mindspring.com wrote:
> 	- run fetchmail on system A, which will redirect the query to system B. 
> 	- have system B intercept that query and pass it on to the 
> 	  proper pop server on the net
> 	- take the mail off the server using B, but pass it back to 
> 	  system A

  From a command prompt on "system A" [1], you want to SSH to system B.  
Use SSH port forwarding to forward connections from the local system (A) out
from the other end (B).  Specify the POP server hostname and port number for
the remote end.  You will need to use a non-standard port number, since POP3
is TCP 110, and only "root" can listen on ports <1024.  You will also need
to tell fetchmail about this non-standard port number.

  For example:

ssh pll at system-b -L 8110:pop-server:110
fetchmail --protocol POP3 --port 8110 localhost

  In the above, fetchmail connects to port 8110 on the local system (A).  
The SSH client is listening on port 8110, and forwards the connection to the
SSH server on system B.  System B then connects to "pop-server" on TCP port
110, and finishes the connection.

Footnotes
---------

[1] Why don't people ever use the real names of the servers in their
    examples?  It just confuses things, and you end up saying things like
    "the server -- not the mail server, I mean the other server".

-- 
Ben Scott <bscott at ntisys.com>
| The opinions expressed in this message are those of the author and do not |
| necessarily represent the views or policy of any other person, entity or  |
| organization.  All information is provided without warranty of any kind.  |




More information about the gnhlug-discuss mailing list