EC2's EIP port 443 not working

0

Hi everyone,

I have an EC2 instance with Ubuntu and an attached Elastic IP (EIP), and services running on ports 443 and 3000. The security group settings are as follows:

Port rangeProtocolSource
22TCP10.0.0.0/8
3000TCP10.0.0.0/8
443TCP0.0.0.0/0

The problem is that when I use telnet to test the ports, for example:

$ telnet internal IP:22 or $ telnet to the internal IP:3000, it works fine.

However, when I try to $ telnet EIP:443, it fails and returns a connection refused error.

When I try $ telnet internal IP:443, it works fine.

But the security group is configured with 0.0.0.0/0. Why can't I telnet to the EIP on port 443?

BTW, the ufw is inactive, and don't have iptables, Network ACL as follow:

Rule numberTypeProtocolPort rangeSourceAllow/Deny
100All trafficALLALL0.0.0.0/0Allow
*All trafficALLALL0.0.0.0/0Deny
Duke
posta un mese fa104 visualizzazioni
2 Risposte
1
Risposta accettata

Is there an Internet Gateway attached to the VPC or is it over a NAT Gateway? Can you access Internet from the instance? Here is a detail troubleshooting list.

profile pictureAWS
ESPERTO
con risposta un mese fa
profile picture
ESPERTO
verificato un mese fa
profile picture
ESPERTO
verificato un mese fa
  • Not only is there an IGW on the VPC but is it in the Route Table for the subnet containing the instance as the default route.

    Also recommend checking VPC flowlogs for REJECT messages to help troubleshoot.

  • Hi AWS-User-alantam, Thank you for your reply.

  • It's route table not associate with IGW.

1

Two things come to mind here, firstly do you have the security group associated with the new network interface that has the elastic IP atttached? https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/MultipleIP.html#MultipleIPReqs

  • You associate security groups with network interfaces, not individual IP addresses. Therefore, each IP address you specify in a network interface is subject to the security group of its network interface.

Second thing is around the software that is listening on port 443, is it set to listen on the IP address associated with the NIC to which the elastic IP is attached? Taking Apache as an example https://httpd.apache.org/docs/2.4/bind.html

profile picture
ESPERTO
Steve_M
con risposta un mese fa
profile picture
ESPERTO
verificato un mese fa
  • Hi Steve_M, Thank you for your reply.

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande