在 Amazon EC2 上打开 HTTP 端口 [英] Open a HTTP port on Amazon EC2

查看:48
本文介绍了在 Amazon EC2 上打开 HTTP 端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在端口 8080 上运行的 Tomcat 7 实例,并且想在不同的端口上运行 Jenkins.另一种选择是更改 Jenkins URL.

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.

如何将条目添加到允许的端口列表中?

我试过运行:sudo/sbin/iptables -A INPUT -p tcp --dport 8181 -j ACCEPT,但在 AWS 控制台中它只显示这些端口:

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

是否可以通过 AWS 控制台添加 HTTP 端口 (8181)?

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

更新:

我已经尝试添加自定义的TCP端口,但后来没有得到HTTP协议,而且当我选择HTTP时,我无法指定端口!

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!

推荐答案

在 EC2 控制台中,查找您的实例的安全组"列.然后转到左侧导航菜单中网络和安全"上方的安全组"选项.它将显示您之前看到的安全组.单击它,它将显示一个分屏,其中上面的一个有 2 个选项卡:详细信息和入站.转至入站,在端口范围输入 8181 中输入您希望允许传入访问实例的 IP.不要忘记应用更改.

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.

这篇关于在 Amazon EC2 上打开 HTTP 端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆