Connection is filtered when using Elastic IP for EC2 Linux 2


Hi there,
I am suffering a wired situation about Amazon Linux 2 EC2 that using elastic IP. I have done everything I can think to find out the cause and I allocated there is something wrong between instance connection and gateway.
There are situation as following:

  1. The instance ID is i-0a1ca97b4c1bb9274 and associated with an elastic IP.
  2. All connections will be closed or filtered after the instance is started for around 5 minutes. Only 22 for SSH is opened.
    I have done all following instruction to find the cause, and nothing changed.
  3. This instance is the only one have this problem under the VPC. This VPC has 10 more instances work fine with same security group and configuration.
  4. I use “sudo reboot”, the connection will not be reset. Ports are still closed to public. But I “stop” and “start” instance from control panel, it can run for around 5mins and all ports closed again.
  5. Current instance is new generated one that replaced the instance has same problem with same elastic IP that will lose connection.
  6. I used other instances in same VPC to get html with “curl” from it via Private IP, they got correct returns on port 80 and 443. That means httpd works and listening. When use public IP, curl will not return anything on any ports.
  7. I tried to associate different Elastic IP to this instance, but the instance still not connected to public network.
  8. This instance is running without problem for around one or two weeks and now it come into this situation.
    I am wondering is there any filtering on the gateway or firewall pre-installed with Amazon Linux 2 to get this problem.
    Any suggestions will be a great help.
asked 4 years ago235 views
1 Answer


answered 4 years 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.

Guidelines for Answering Questions