how to tunnel an imap connection over ssh

From: Pete Phillips (pete_at_philfam.co.uk)
Date: 05/14/05

  • Next message: Richard E. Silverman: "Re: how to tunnel an imap connection over ssh"
    Date: Sat, 14 May 2005 20:39:42 +0100
    
    

    Hi

    I have an IMAP server inside our firewall(call this imap.domain.org).

    I have the firewall set up to port forward ssh to another internal
    machine (call this fileserver.domain.org).

    Looks a bit like this:

         +-----------+
         |HomeMachine|
         +-----------+
               |
               |
          +--------+
          |Firewall|
          +--------+
               | Port forwards all ssh connections to fileserver
               |
          +----------+
          |FileServer|
          +----------+
               |
          +-----------+
          |IMAP Server|
          +-----------+

    I have a login account on fileserver, but IMAP is set up with cyrus imap
    as a black box, no login accounts, using sasl plain.

    I want to set up an ssh tunnel from my local host, through the firewall,
    through the file server so that the last part of the chain forwards to
    IMAP. The idea is that I can then point my mail reader to the localhost
    port and it will be able to authenticate to the imap server.

    I have tried this:

      ssh -v -x -L3333:localhost:4444 firewall.domain.org ssh -x
    -L4444:localhost:143 imap.domain.org -N imap.domain.org

    but it tries to ssh into the imap server (and as I don't have an account
    on it this fails). Clearly I am confused about what is happening here
    (and what I am trying to do!). Any ideas (or putting straight) much
    appreciated.

    I could, if necessary, set up login accounts on the cyrus server, but
    that seems to defeat the object of running it as a black box.

    Thanks in advance,
    Pete


  • Next message: Richard E. Silverman: "Re: how to tunnel an imap connection over ssh"