在 Amazon EC2 上打开 HTTP 端口
我有一个在端口 8080 上运行的 Tomcat 7 实例,并且想在不同的端口上运行 Jenkins。另一种选择是更改 Jenkins URL。
如何将条目添加到允许的端口列表中?
我尝试运行:sudo /sbin/iptables -A INPUT -p tcp --dport 8181 -j ACCEPT
,但在 AWS 控制台中它仅显示这些端口:
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?
更新:
我已经尝试添加自定义 TCP 端口,但是它没有获取 HTTP 协议,并且当我选择 HTTP 时,我无法指定端口!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 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.
根据 Agat,仔细检查服务器本身的防火墙设置。我对端口 8090 也有同样的问题,然后我意识到我需要在 Windows 防火墙中打开它。
As per Agat, double check the firewall settings on the server itself. I had the same issue with port 8090 and then I realised I needed to open it in the Windows firewall.