ec2:无法在 Windows 实例上打开端口 5080

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3955910/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 15:25:43  来源:igfitidea点击:

ec2: cannot open port 5080 on windows instance

windowsamazon-ec2firewallred5windows-firewall

提问by Hoff

I'm pretty new with ec2, firewall settings etc, so I might be missing something obvious, but:

我对 ec2、防火墙设置等很陌生,所以我可能会遗漏一些明显的东西,但是:

  • I've created a 'getting started with windows' instance
  • with a security group that has 5080 specified
  • and is associated with an elastic ip
  • 我创建了一个“Windows 入门”实例
  • 使用指定了 5080 的安全组
  • 并与弹性 ip 相关联

On the instance I have a red5 server running. when I run the server it on 127.0.0.1:5080, i can access it from a browser on that instance, so I know the server works.

在实例上,我运行了一个 red5 服务器。当我在 127.0.0.1:5080 上运行服务器时,我可以从该实例上的浏览器访问它,所以我知道服务器正常工作。

When I run it on the elastic IP however, I can't connect to it, neither from within the instance nor from outside.

但是,当我在弹性 IP 上运行它时,无论是从实例内部还是外部,我都无法连接到它。

when I run telnet 75.101.147.86 5080 from the outside world i get 'connection refused'

当我从外界运行 telnet 75.101.147.86 5080 时,我得到“连接被拒绝”

Anyclues on how to debug this would be highly appreciated!

任何有关如何调试的线索将不胜感激!

Thanks in advance,

提前致谢,

Martin

马丁

回答by eSniff

In the AWS management console.

在 AWS 管理控制台中。

1 goto Amazon EC2tab

1 转到Amazon EC2选项卡

2 Click on Instancesand note the Security Group Namefrom the Security Groupcolumn for the instance you want to open it for.

2 单击实例并记下要为其打开的实例的安全组列中的安全组名称

3 Click on the link Security Groups

3 单击链接安全组

4 Click on the Security Group Namefrom step 2.

4 单击步骤 2 中的安全组名称

5 You should see a dropdown that says SSH, click it and select Custom..

5 您应该会看到一个下拉列表,上面写着SSH,单击它并选择Custom..

6 Enter:

6 输入:

 Protocol                  TCP
 From Port                 5080
 To Port                   5080
 Source (IP or Group)      0.0.0.0/0       -- NOTE 1
 Protocol                  TCP
 From Port                 5080
 To Port                   5080
 Source (IP or Group)      0.0.0.0/0       -- NOTE 1

7 Click Save.

7 单击保存。

If you need UDP also, then repeat using Protocol UDP in step 6.

如果您还需要 UDP,则在步骤 6 中重复使用协议 UDP。

NOTE 1: Read : http://en.wikipedia.org/wiki/Classless_Inter-Domain_Routingfor more info... but don't try to limit the subnet until you have it working for the world.

注意 1:阅读:http: //en.wikipedia.org/wiki/Classless_Inter-Domain_Routing了解更多信息......但不要试图限制子网,直到你让它为世界工作。

If it doesn't work after that then you may have a firewall on the instance. I'm more of an ubuntu guy, but try this : http://www.cyberciti.biz/faq/disable-linux-firewall-under-centos-rhel-fedora/for RedHat

如果之后它不起作用,那么您可能在实例上安装了防火墙。我更像是一个 ubuntu 人,但试试这个:http: //www.cyberciti.biz/faq/disable-linux-firewall-under-centos-rhel-fedora/for RedHat

回答by Ahmed El Melegy

A workaround for this problem to change the default port at ../conf/red5.properties to any other port. I changed it to 5081 and it works.

此问题的解决方法是将 ../conf/red5.properties 中的默认端口更改为任何其他端口。我将其更改为 5081 并且它有效。