Skip to content

Reverse port forwarding from local machine to AWS EC2 private instance.

0

Hi,

I have apache2 running on port 8080 in my local machine and I want to port forward from local machine to remote ec2 private instance.

2 Answers
1

Hello.

Does this mean that when you access "http://localhost:8080" you want to proxy to the web server of the EC2 instance?
If that's the case, I think you should configure Apache's proxy settings so that it can access the public IP address of EC2.
https://httpd.apache.org/docs/2.4/en/mod/mod_proxy.html

If EC2 is running in a private subnet, you may be able to use Systems Manager's port forwarding feature.
https://aws.amazon.com/jp/blogs/mt/use-port-forwarding-in-aws-systems-manager-session-manager-to-connect-to-remote-hosts/

EXPERT
answered a year ago
EXPERT
reviewed a year ago
AWS
EXPERT
reviewed a year ago
0
EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.