Created
November 8, 2012 07:03
-
-
Save swaroopch/4037328 to your computer and use it in GitHub Desktop.
(not working) How to expose a local server to the outside world via an EC2 server?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Before: I have a local Java or Django server running on port 8000 | |
function expose_port { | |
local_port=$1 | |
shift | |
ssh -vvv -i "$HOME/.ssh/aws.pem" -N -R "9000:localhost:8000" "[email protected]" | |
} | |
# After: Open http://ec2-12-34-56-789.compute-1.amazonaws.com:9000 and it should work |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment