| Linode Forum https://forum.linode.com/ |
|
| ssh-tunnel on port 4007 https://forum.linode.com/viewtopic.php?f=19&t=4929 |
Page 1 of 1 |
| Author: | andhapp [ Sat Dec 05, 2009 10:50 am ] |
| Post subject: | ssh-tunnel on port 4007 |
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? |
|
| Author: | anderiv [ Sat Dec 05, 2009 3:44 pm ] |
| Post subject: | |
What command are you using to start the ssh tunnel? |
|
| Author: | andhapp [ Sat Dec 05, 2009 4:02 pm ] |
| Post subject: | ssh tunnel |
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. |
|
| Author: | anderiv [ Sat Dec 05, 2009 4:10 pm ] |
| Post subject: | Re: ssh tunnel |
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. |
|
| Author: | andhapp [ Sat Dec 05, 2009 4:37 pm ] |
| Post subject: | ssh-tunnel on port 4007 |
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. |
|
| Author: | anderiv [ Sat Dec 05, 2009 4:50 pm ] |
| Post subject: | Re: ssh-tunnel on port 4007 |
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? |
|
| Author: | andhapp [ Sat Dec 05, 2009 5:15 pm ] |
| Post subject: | Re: ssh-tunnel on port 4007 |
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. |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|