Linux – AWS ec2 – open port 8080

amazon ec2amazon-web-serviceslinuxtomcat

I have an AWS ec2 instance. I have installed tomcat and now want to access it via the browser on port 8080. When I try to do so, the browser hangs. I HAVE ADDED 8080 TO THE DEFAULT SECURITY GROUP. I see that you can open different ports for different regions, I have added the port for every region.

Here is what I've done so far:

//install tomcat
# sudo yum install tomcat6
//open port on server

# sudo iptables -A INPUT -i eth0 -p tcp --sport 8080 -m state --state NEW,ESTABLISHED -j ACCEPT


//start tomcat

# sudo service tomcat6 start

//and rule to AWS security group for port 8080
AWS dashboard > ec2 > security groups > default group > inbound rule: 8080 (HTTP*) 0.0.0.0/0


//check via cli that tomcat is running on port 8080
# udo fuser -v 8080/tcp

(successful response) 8080/tcp:            tomcat    16353 F.... java

//check via browser
http://ec2-instance-dns:8080 (browser tries to load page indefinitely)

Best Answer

You also need to add the port in the security group in the AWS-config-panel.

enter image description here