93

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?

kenorb
  • 155,785
  • 88
  • 678
  • 743
Manish Kumar
  • 10,214
  • 25
  • 77
  • 147

3 Answers3

191

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

Céline Aussourd
  • 10,214
  • 4
  • 32
  • 36
9

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.

John Velandia
  • 129
  • 1
  • 4
3

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.

Raj Kumar
  • 300
  • 3
  • 8