Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open a HTTP port on Amazon EC2

I have a Tomcat 7 instance running on port 8080, and would like to run Jenkins on a different port. Another alternative would be to change the Jenkins URL.

How do I add an entry to the list of allowed ports?

I have tried running: sudo /sbin/iptables -A INPUT -p tcp --dport 8181 -j ACCEPT, but in the AWS console it shows only these ports:

0 - 65535       0.0.0.0/0
22 (SSH)        0.0.0.0/0
80 (HTTP)       0.0.0.0/0
443 (HTTPS)     0.0.0.0/0
3306 (MYSQL)    0.0.0.0/0
8080 (HTTP*)    0.0.0.0/0

Is it possible to add a HTTP port (8181) via the AWS console?

Update:

I already tried adding a custom TCP port, but then it doesn't get the HTTP protocol, and when I select HTTP, I can't specify the port!

like image 819
whirlwin Avatar asked Feb 09 '12 10:02

whirlwin


1 Answers

In EC2 console, look for the column "Security Group" of your instance. Then go to option "Security Groups" above "NETWORK & SECURITY" in navigation menu on left. It will show up the security group you saw before. Click on it, it will show a split screen where the one is above has 2 tabs: Details and Inbound. Go to Inbound, in port range input 8181 and source the ip you want to allow incoming access to instance. Don't forget to apply changes.

like image 108
gabrielhpugliese Avatar answered Sep 24 '22 16:09

gabrielhpugliese