Beanstalkd behind NAT, ssh-tunneled

175 views
Skip to first unread message

Charlie

unread,
Sep 6, 2011, 4:11:19 PM9/6/11
to beanstalk-talk
Hey all,

I'm running a distributed photo-stitching system. I have a central
server running beanstalkd on the standard port. I'm using beanstalk
to distribute jobs, and beanstalkc in a python script that runs on
nodes to receive and process them. I'm tunnelling the beanstalk
connection over ssh, and this is working fine for machines on my local
network. I use the following command to tunnel the beanstalk port to
localhost, then connect locally and all's well.

ssh -f us...@host.com -L 11300:host.com:11300 -N

Where I run into problems is trying to do this on a remote host. I
have my ssh port forwarded to external port 33333 on my router, and I
can ssh in from remotely with no trouble. But tunnelling to beanstalk
doesn't work. I tunnel with this command:

ssh -f us...@host.com -L 11300:host.com:11300 -N -p 33333

And it's successful. but then if I telnet to port 11300 locally, I
get the following error:

channel 1: open failed: connect failed: Connection refused

^ this is an ssh error, not a telnet one. Somewhere, presumably in
the NAT, i'm unable to connect to the beanstalk server over ssh. I'm
stumped. Any ideas on something i'm missing, or alternatives? I
don't want to just expose beanstalkd to the world without some level
of encryption.

Thanks all,
Charlie

Dustin

unread,
Sep 7, 2011, 3:55:26 AM9/7/11
to beansta...@googlegroups.com
Is it listening on the IP address you're trying to connect to?

Håkon Nessjøen

unread,
Sep 7, 2011, 12:04:22 PM9/7/11
to beanstalk-talk
Shouldn't you really do ssh -f us...@host.com -L 11300:localhost:11300 -
N
?

Or are your beanstalk server listening on 0.0.0.0? Either way, it's
probably better to use localhost.

Maybe this helps?

Regards,
Håkon Nessjøen

On Sep 6, 10:11 pm, Charlie <charlie.h...@gmail.com> wrote:
> Hey all,
>
> I'm running a distributed photo-stitching system.  I have a central
> server running beanstalkd on the standard port.  I'm using beanstalk
> to distribute jobs, and beanstalkc in a python script that runs on
> nodes to receive and process them.  I'm tunnelling the beanstalk
> connection over ssh, and this is working fine for machines on my local
> network. I use the following command to tunnel the beanstalk port to
> localhost, then connect locally and all's well.
>
> ssh -f u...@host.com -L 11300:host.com:11300 -N
>
> Where I run into problems is trying to do this on a remote host.  I
> have my ssh port forwarded to external port 33333 on my router, and I
> can ssh in from remotely with no trouble.  But tunnelling to beanstalk
> doesn't work.  I tunnel with this command:
>
> ssh -f u...@host.com -L 11300:host.com:11300 -N -p 33333
Reply all
Reply to author
Forward
0 new messages