I'm running a t3.medium EC2 instance with Amazon Linux 2023 and it has an elastic IP associated with it. My security group is set to allow all IPv4 and IPv6 access for SSH, HTTP, and HTTPS. For some reason, I can no longer connect to it via HTTPS or HTTP. However, SSH works without issue. I can access the server by tunneling through SSH, which shows that the server itself is functioning well. I haven't made any changes to my VPC, Security Group, or other settings in the last 12 hours, so I'm puzzled as to why my HTTPS and HTTP traffic are being blocked while SSH still works. I'm located in the eu-west-3 region. Any ideas?
3 Answers
Try running a tcpdump on ports 443 and 80 to check if any traffic is reaching your instance. If there's nothing coming through, it could be an issue with your security group or network access list. If you see traffic, then it might be that your instance isn’t listening on those ports or there's a firewall on the instance itself blocking it.
It sounds like there could be a server-side firewall in place that's causing this issue. You might want to check the firewall settings on your instance to ensure HTTP and HTTPS traffic is allowed.
You might want to stop and then restart the instance. This can help move it to new hardware, especially since it's already down. This could also help rule out any underlying AWS issues affecting the connectivity.

Thanks for the suggestion! I found out that firewalld was enabled yesterday, probably due to an update. Now I need to figure out why it's blocking HTTP/HTTPS, but I can at least disable it for now!