Created
January 14, 2014 02:36
-
-
Save elyezer/8412079 to your computer and use it in GitHub Desktop.
How to create a reverse proxy using an EC2 instance
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
sudo vim /etc/ssh/sshd_config | |
# Set GatewayPorts option to yes | |
sudo service sshd restart |
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
REMOTE_PORT=8080 | |
LOCAL_PORT=8000 | |
INSTANCE_HOST=instance.host.compute.amazonaws.com | |
KEY_PATH=~/.ssh/mykey.pem | |
ssh -R *:$REMOTE_PORT:localhost:$LOCAL_PORT -i $KEY_PATH ec2-user@$HOST -N |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment