我看到了许多有关该主题的帖子,但是建议的解决方案似乎都无法解决我的问题。
我正在使用简单的回显客户端-服务器程序测试与运行Ubuntu 12 64位的Amazon EC2实例的连接性。(Java EchoServer;Java EchoClient)
这是事实:
我在安全组中创建了一个规则,以在端口22000上启用入站TCP TCP Port (Service) 22000-22001 Source 0.0.0.0/0
Ubuntu防火墙已禁用
sudo ufw disable
EchoClient [amazon-instance-dns-addr] 22000
从另一个Amazon EC2实例尝试时,它按预期运行良好[amazon-instance-dns-addr]
从外部计算机ping时,我会收到响应(我也在安全组中启用了ICMP规则)。EchoClient [amazon-instance-dns-addr] 22000
从外部计算机尝试时,它无法连接。因此,第5点是问题。我看不到我想念的东西。我希望在这里提供一些帮助。
更新:iptables -L
输出。
Chain INPUT (policy ACCEPT)
target prot opt source destination
ufw-before-logging-input all -- anywhere anywhere
ufw-before-input all -- anywhere anywhere
ufw-after-input all -- anywhere anywhere
ufw-after-logging-input all -- anywhere anywhere
ufw-reject-input all -- anywhere anywhere
ufw-track-input all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ufw-before-logging-forward all -- anywhere anywhere
ufw-before-forward all -- anywhere anywhere
ufw-after-forward all -- anywhere anywhere
ufw-after-logging-forward all -- anywhere anywhere
ufw-reject-forward all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ufw-before-logging-output all -- anywhere anywhere
ufw-before-output all -- anywhere anywhere
ufw-after-output all -- anywhere anywhere
ufw-after-logging-output all -- anywhere anywhere
ufw-reject-output all -- anywhere anywhere
ufw-track-output all -- anywhere anywhere
Chain ufw-after-forward (1 references)
target prot opt source destination
Chain ufw-after-input (1 references)
target prot opt source destination
Chain ufw-after-logging-forward (1 references)
target prot opt source destination
Chain ufw-after-logging-input (1 references)
target prot opt source destination
Chain ufw-after-logging-output (1 references)
target prot opt source destination
Chain ufw-after-output (1 references)
target prot opt source destination
Chain ufw-before-forward (1 references)
target prot opt source destination
Chain ufw-before-input (1 references)
target prot opt source destination
Chain ufw-before-logging-forward (1 references)
target prot opt source destination
Chain ufw-before-logging-input (1 references)
target prot opt source destination
Chain ufw-before-logging-output (1 references)
target prot opt source destination
Chain ufw-before-output (1 references)
target prot opt source destination
Chain ufw-reject-forward (1 references)
target prot opt source destination
Chain ufw-reject-input (1 references)
target prot opt source destination
Chain ufw-reject-output (1 references)
target prot opt source destination
Chain ufw-track-input (1 references)
target prot opt source destination
Chain ufw-track-output (1 references)
target prot opt source destination
我发现组织的防火墙阻止了到这些端口的传出连接(22000和其他我尝试过的端口。)
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句