Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: ssh-tunnel on port 4007
PostPosted: Sat Dec 05, 2009 10:50 am 
Offline
Senior Newbie

Joined: Sat Dec 05, 2009 10:46 am
Posts: 5
I am using the facebooker gem to create a facebook application. To test it on my local machine I am opening a ssh-tunnel on port 4007 so that all the requests to that port get forwarded to my local machine. This is a facility offered by facebooker gem which takes the pain out of testing the application on local machine.

I have followed the instructions and it seems that the tunnel is created but when I access the site on port 4007 it just does not forward it to my local machine. I always tried taking the iptables down but no luck. What else can I do to fix the issue?


Top
   
 Post subject:
PostPosted: Sat Dec 05, 2009 3:44 pm 
Offline
Senior Member

Joined: Tue Apr 27, 2004 5:10 pm
Posts: 212
What command are you using to start the ssh tunnel?


Top
   
 Post subject: ssh tunnel
PostPosted: Sat Dec 05, 2009 4:02 pm 
Offline
Senior Newbie

Joined: Sat Dec 05, 2009 10:46 am
Posts: 5
I think I might know what is causing it. I am actually behind a router so I will have to ensure that router forwards any request it receives to my localhost on port 3000 because now router now refuses the connection. So, I think I need to configure my router.


Top
   
 Post subject: Re: ssh tunnel
PostPosted: Sat Dec 05, 2009 4:10 pm 
Offline
Senior Member

Joined: Tue Apr 27, 2004 5:10 pm
Posts: 212
andhapp wrote:
I think I might know what is causing it. I am actually behind a router so I will have to ensure that router forwards any request it receives to my localhost on port 3000 because now router now refuses the connection. So, I think I need to configure my router.

Are you initiating the ssh connection from behind the router? If so, there's no need to reconfigure the router.


Top
   
 Post subject: ssh-tunnel on port 4007
PostPosted: Sat Dec 05, 2009 4:37 pm 
Offline
Senior Newbie

Joined: Sat Dec 05, 2009 10:46 am
Posts: 5
Yeah, I am initiating it from behind the router. So, I don't need to reconfigure the router...interesting.

You asked about the command. I am just running the command provided by facebooker which kind of creates a tunnel so that anything that tries to come to my domain (im.andhapp.co.uk) running on linode on port 4007 to forward to my localhost running on port 3000. I am not sure how they are doing it internally but can you suggest what command should I be using for it and I will just run that and see if that works. There might be a bug in the facebooker gem.


Top
   
PostPosted: Sat Dec 05, 2009 4:50 pm 
Offline
Senior Member

Joined: Tue Apr 27, 2004 5:10 pm
Posts: 212
andhapp wrote:
Yeah, I am initiating it from behind the router. So, I don't need to reconfigure the router...interesting.

You asked about the command. I am just running the command provided by facebooker which kind of creates a tunnel so that anything that tries to come to my domain (im.andhapp.co.uk) running on linode on port 4007 to forward to my localhost running on port 3000. I am not sure how they are doing it internally but can you suggest what command should I be using for it and I will just run that and see if that works. There might be a bug in the facebooker gem.


For that port forward, the command should be something like:

Code:
$ ssh -R 4007:localhost:3000 user@domain.com


If that's being generated from within this app, though, it may be hard to track this down.

Do you have any firewall running on your local machine?


Top
   
PostPosted: Sat Dec 05, 2009 5:15 pm 
Offline
Senior Newbie

Joined: Sat Dec 05, 2009 10:46 am
Posts: 5
anderiv wrote:

For that port forward, the command should be something like:

Code:
$ ssh -R 4007:localhost:3000 user@domain.com


If that's being generated from within this app, though, it may be hard to track this down.

Do you have any firewall running on your local machine?


Thanks.

Well, I tried the command that it seems to set uo the tunnel and I checked it using the facebooker gem (as it has a utility to check if a tunnel is created and is up) and it is all ok. So, now if I go to www.domain.com:4007 then it should forward me to localhost:3000. Is that correct?

But it does not. When I access www.domain.com:4007 in my browser it just says "Firefox can't connect to the server on this port".

So, ssh-tunnel works but do you think there is something in my iptables on my linode that is stopping it from working. Thanks for all your help.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group