Help → v1.0.1 (cross-platform) on OSX via SSH tunnel

v1.0.1 (cross-platform) on OSX via SSH tunnel

Hey all, I've got an unusual setup I think, but I'd really like to get it working. (I've had the same working flawlessly with 0.2x on Debian for a couple years now until the hard disk crashed.)

OSX 10.5.4 "leopard" clean install with updates on powerpc. Installed the developer tools and POPFile using the instructions for Tiger here: http://getpopfile.org/docs/howtos:macosx e.g. downloading and building each perl module

I'm running my email client (Apple Mail) on a separate machine so I'm setting up POPFile to run as an always-on server that I can either connect to over my home LAN or via an SSH tunnel from work or while traveling, etc.

It seems to work fine accessing and configuring the GUI on the machine itself. Also works fine on the home LAN. But when I try to add SSH tunneling into the picture it doesn't work.

I've verified that other things (Apple screen sharing, SMTP) are running through the tunnel just fine. When I try to use the POPFile GUI through the tunnel I get this message in my /Private/var/log/secure.log:

Aug 12 09:48:49 Sundog sshd[2614]: error: setsockopt TCP_NODELAY: Invalid Argument

(Sundog is the server.) And on the client side of the tunnel I get:

channel 13: open failed: connect failed: Connection refused

When I try to connect to the POP port, the connection fails, though I haven't yet found any evidence in the logs about it.

The tunnel is set up (in part) like this:

ssh -2 -N -f -L 8080:localhost:8080 -L 7071:localhost:110 user@host.org

That is, when I connect to my local machine on 8080 it is tunneled to the same port on the server. When I use 7071 it goes to 110 on the server. Also from outside my home LAN, port 22 is forwarded to Sundog, the server.

I have set everything on the POPFile GUI up for access from remote machines.

If anyone knows something else I might try, or if there is a configuration bit I'm missing somewhere, I'd really appreciate the info.

Thanks
-M

  • Message #326

    Also works fine on the home LAN. But when I try to add SSH tunneling into the picture it doesn't work.

    Does that mean that you have POPFile set-up so it will bind to 0.0.0.0 rather than 127.0.0.1? In that case your ssh call would be wrong and you should use the server's IP address instead of 'localhost'.

    Manni

    • Message #327

      Does that mean that you have POPFile set-up so it will bind to 0.0.0.0 rather than 127.0.0.1? In that case your ssh call would be wrong and you should use the server's IP address instead of 'localhost'.


      Manni

      Manni, I'm not sure what set-up option you are referring to but your reply seems to have led to the solution. If I change my ssh call to the following everything works:

      ssh -2 -N -f -L 8080:10.1.1.10:8080 -L 8110:10.1.1.10:110 user@host.org

      Where the server's IP on the home LAN is 10.1.1.10. I have tried using different port numbers under suspicion that 8080 was special on OSX (apparently it isn't.) This one change seems to have made the difference. Notable also that this differs from usage when running a similar setup on Debian/Ubuntu.

      So thanks for the tip, and any further info as to why it works would be most helpful as well.

      -M

      • Message #328

        Your original ssh tunnel directed requests to localhost:8080 (e.g.) to your server, specifically to localhost:8080 on the server.

        However, POPFile isn't listening on that address. The give-away was that you wrote that you could access the remote POPFile from within your LAN. For that to work, POPFile cannot be listening on localhost/127.0.0.1, it must be listening on a real nethwork interface.

        Perhaps you could only access POPFile through the ssh tunnel in your Debian days, even from within your LAN? In that case, POPFile was indeed listening on 127.0.0.1.

        Manni