Skip to content

Problem to use EC2 Instance IP address.

0

I've an EC2 Instance in this instance is installed the Java, MySQL, Tomcat and the firewall UFW, my ufw is configured to permit port 22, 3306, 80, 443 and 8080. The problem is that to load Tomcat in the browser I need of an IP but the Public IPv4 address or Public IPv4 DNS don't work, what is the IP that I must to use. I must to say that I don't have any dns defined in my aws account. Thanks and best regards.

asked a year ago178 views
4 Answers
1

my ufw is configured to permit port 22, 3306, 80, 443 and 8080

Do you also have these ports open in the Security Group associated with the instance?

You mention the instance has a public IPv4 address & DNS name, is the instance in a publicy-accessible subnet? That is a subnet which has a route to an internet gateway in its route table https://docs.aws.amazon.com/vpc/latest/userguide/vpc-igw-internet-access.html

If you are using a default subnet in the default VPC for that region then the answer is likely to be yes, but it's worth double-checking.

EXPERT
answered a year ago
1

Agree with steve

answered a year ago
0

Hi Steve, in my Security Group I've three security group id sg-0a6e7b17de1843d5d - default, sg-0c7be9f53f808f0ac - default and sg-024a524ab2b169775 - launch-wizard-1, the first and second security group id have Type = All trafic, Protocol =All and Port = All seted, the tird security group id have three security group rule seted as:

sgr-0acc0ab651111fbab IP version = IPv4 Type = MYSQL/Aurora Protocol = TCP Port range = 3306 Source= 0.0.0.0/0

sgr-00a9714b926bc1e5f IP version = IPv4 Type = HTTP Protocol = TCP Port range = 80 Source = 0.0.0.0/0

sgr-0ccd36f16ec7fccc6 IP version = IPv4 Type = SSH Protocol= TCP Port range = 22 Source = 0.0.0.0/0

Thanks by your assistance.

answered a year ago
  • Are all three security groups attached to your instance?

    launch-wizard-1 is the name of an SG that is created at instance creation time if you don't specify to attach a pre-existing security group, so I would guess this one is in use.

    It has ports 22 (SSH), 80 (HTTP) and 3306 (MySQL) already open. Sound like you need to add 443 & 8080 as well.

    Especially if Tomcat is listening on its default port 8080.

0

I solved this problem after your feedback. Thanks.

answered a year 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.