Accessing a server behind a loadbalancer with its ip over https instead of loadbalancer dns

0

Hello

I have a server behind a loadbalancer which I am able to access with the loadbalancer url and its configured domain with ease. However an application on the server needs to be tested and accessed with its ip and port (alphanumeric values or urls arent acceptable due to the nature of the device). Since I attached the server to the loadbalancer I can no longer access it via its ip directly, is there anyway I can access the server with its ip directly?

Olive
已提问 1 个月前346 查看次数
4 回答
2
已接受的回答

As long as the security group associated to that instance allows an inbound rule to allow access, it should be possible.

It all depends on your network topology and where the server is located (private subnet, etc..)

profile picture
专家
已回答 1 个月前
profile picture
专家
已审核 1 个月前
profile picture
专家
已审核 1 个月前
2

You can place your server in a public subnet (a subnet with a direct route to the internet gateway) and assign your server with a public IP or elastic IP.

In order to prevent clients other than your test client to directly access the server, make sure the server's security group inbound rules allow only traffic from the security group associated with the load balancer and the source IP of your test client.

AWS
已回答 1 个月前
2

Hi,

In addition to the above approaches, if you are looking to keep your EC2 instance in a private subnet, you can choose to use a Network Load balancer (NLB). A Network Load Balancer distributes incoming TCP and UDP traffic across multiple targets such as Amazon EC2 instances, microservices, and containers.

You can associate a static IP/elastic IP address with a NLB which will make sure the application which is trying to reach this EC2 uses the same IP address for communication.

Further reading here

Hope this helps!

Thanks, Rama

profile pictureAWS
Rama
已回答 1 个月前
profile picture
专家
已审核 1 个月前
profile picture
专家
已审核 1 个月前
0

I had to allow access from my ip to the specific port the application is running on before I was able to access it from the ip directly, thank you all so much for pointing me to the right direction. It is sorted now

Olive
已回答 1 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则