I have deployed a web application on tomcat server on AWS EC2 Windows instance. But i'm not able to access this application on public network. I have already configured the security group of EC2 instance to allow request from any IP on all ports. But when i ping its public IP address from my local machine, i do not get any response. I also have an EC2 Linux instance configured the same way. I'm able to ping its public IP address. Is there any difference between the configurations of Windows and Linux instance?
2 Answers
First, log in to the EC2 Windows instance and check is it running on localhost there or not?
And check if you are running on port 8080 then it must be allowed from the internal firewall of the Windows Server to outbound for running it on public IP
If it is running on localhost then follow the bellow steps else recheck the internal server configuration of tomcat and Windows Server.
Please check the EC2 Windows instance is attached with same Public Subnet as EC2 Linux instance
If subnets are different them that can be a problem and if the internet gateway is not attached or configured with the subnet then it is causing the issue And also check your current instance is attached with the public interface
The main thing is you need to configure your EC2 Windows instance with each same configuration of EC2 Linux configuration except OS and port of RDP(3389) and SSH(22)
I'd suggest 2 places to check: VPC traffic rules and the Windows firewall.
VPC Traffic rules
By default, AWS blocks the ping requests. Therefore, better to ensure it is opened properly (security groups and Network ACL): start with allowing ICMP protocol in the security group that is associated with your EC2 instance.
If the ICMP is open, ensure that the source IP is set properly (either your public IP address or any IP address).
You can check the same in the Network ACL of the subnet.
Windows firewall
I've encountered scenarios in which the Windows internal firewall blocked the ping requests. To overcome this, you can login into the EC2 instance and allow ping requests. You can follow Microsoft guide here
I hope this information helped you solved the problem. Read here for more information about configuring VPC, subnets and traffic rules.