I'm trying to work with facebooks real-time updates but I'm having trouble giving facebook a callback address that they can use. My dev machine is behind a firewall so I want to use an ec2 instance to forward traffic to the dev machine.
Progress so far:
App is up and running on localhost:
http://0.0.0.0:5000
Created Ubuntu 10.11 instance on ec2
Authorize ports on ec2 instance
localhost$ec2-authorize default -p 5000 localhost$ec2-authorize default -p 22
Configure sshd on ec2
localhost$ssh -i ubuntu@ec2_public_dns -i ~/.ssh/ec2_key_pair.pem ec2$sudo echo "AllowTcpForwarding yes" >> /etc/ssh/sshd_config ec2$sudo echo "GatewayPorts yes" >> /etc/ssh/sshd_config ec2$sudo /ect/init.d/ssh restart
Start ssh tunnel
localhost$ssh -R0.0.0.0:5000:localhost:5000 ubuntu@ec2_public_dns -i ~/.ssh/ec2_key_pair.pem
Test it in the browser
http://ec2_public_dns:5000
But nothing happens :( The request just times out. Any ideas what I'm doing wrong?
Thanks!
PROGRESS
OK, I'm making some progress hitting the web server on my local machine. After I ssh in, I can get the home page from the prompt using curl:
localhost$ssh -R0.0.0.0:5000:localhost:5000 ubuntu@ec2_public_dns -i ~/.ssh/ec2_key_pair.pem
ec2$curl localhost:5000
<!DOCTYPE html>
<html>
...
</html>
It even works with the ec2_public_dns
from the ec2:
ec2$curl ec2-23-20-132-36.compute-1.amazonaws.com:5000
<!DOCTYPE html>
<html>
...
</html>
but, it can't connect from my local development machine:
localhost$curl ec2-23-20-132-36.compute-1.amazonaws.com:5000
curl: (7) couldn't connect to host
@spinlock: you never returned to claim your answer, but access rules struck me as the first possibility anyway. I definitely recommend anybody using EC2 spend a bit of time with the Security Groups stuff at first, it's powerful and really helpful. For sake of anyone googling, spinlock's answer is:
So do this: