Bonkers
Bonkers

Reputation: 188

Accessing WebApplication exposed by EC2 instance in Private Subnet

We have a web-application page exposed at port 9090 on an EC2 instance that lives in the private subnet of our AWS setup. We have a bastion host that is in the public subnet, and it can talk to the instance in the private subnet. We can also ssh to the instance thru the ssh tunnel of the bastion.

Is there a guide to setting up a proxy on this bastion host to access the webpage in the browser that is served on the http://PrivateSubnetEC2Isntance:9090/, by redirecting the traffic to/from http://PublicBastion:9090/?

I tried setting up a HAProxy (on bastion), but it doesn't seem to work: there are no errors in the HAproxy logs, but accessing the page http://PublicBastion:9090 just times-out.

Upvotes: 1

Views: 623

Answers (1)

helloV
helloV

Reputation: 52375

Though this is not an answer, most likely it could be due to:

  1. Security group rules: Did you open port 9090 for everyone in Bastion security group?
  2. Is your HAProxy listening on 0.0.0.0 and not on 127.0.0.1?

Upvotes: 1

Related Questions