I have a little web application deployed on an ec2 instance and I'd like to test it without making it publicly available.
Using an elastic IP does not solve my issue because the IP would then expose it to the outside world and we are not ready for this yet.
I'm aware of Amazon VPC but it seems a bit overkill since I don't need all those functionalities and I don't want to deal with the set up. All I need is to be able to hit the webserver by using a private IP or something like that.
Is there a quick and dirty solution for this?
You could setup your web server to listen only on 127.0.0.1 (rather than 0.0.0.0) and then use SSH to tunnel a connection from your local machine to the instance.
From your desktop, setup the SSH connection:
$ ssh -L 3000:localhost:80 [email protected]
Then visit http://localhost:3000
in your browser and it will forward port 3000 on your desktop to port 80 on the instance, via the SSH connection.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With