Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EC2: How to add port 8080 in security group?

I want to add port 8080 to EC2 security group to access tomcat. But whenever I select HTTP from drop down I get 80 port as default and also can't change it.

So how can I add 8080 so that I can access Tomcat publicly?

like image 501
Manish Kumar Avatar asked Oct 13 '14 10:10

Manish Kumar


People also ask

What port number is 8080?

Port number 8080 is usually used for web servers. When a port number is added to the end of the domain name, it drives traffic to the web server. However, users can not reserve port 8080 for secondary web servers.


3 Answers

You have to choose "Custom TCP rule" in the dropdown.

Then you will be able to change the port to 8080.

enter image description here

like image 73
Céline Aussourd Avatar answered Oct 10 '22 17:10

Céline Aussourd


You have to able the port in two different sections: (1) Windows firewall, as it was explained before. (2) Directly in Amazon Web Service console, exactly in security groups/inbound.

like image 41
John Velandia Avatar answered Oct 10 '22 17:10

John Velandia


after adding the rule in security group, you should also turn on the Linux os port in order to access your webservice command for doing that

sudo ufw allow 8080/tcp

Some Extra Information: Actually this is not a good why to deploy the service. we should rather use a reverse proxy server to handle all kind of requests (like nginx), and those request should be routed to specific web service in this why whole traffic will be routed to 80 port(HTTP) or 443 (HTTPS) if you want to configure SSL. Thus a lot of things become easier by using it. Follow this to know how to use Nginx.

like image 2
Raj Kumar Avatar answered Oct 10 '22 17:10

Raj Kumar