[英]Amazon AWS/EC2 - How to put to servers on same “private network”
[英]Amazon aws ec2 network tomcat issue
我遇到了许多其他人无法连接到tomcat端口8080的相同问题
我尝试了所有建议的内容,例如安全组。
然后,我要做的是创建了amazon linux实例(而不是redhat)。
和这工作! 我对两个实例执行了相同的操作:在安全组中添加了TCP端口8080
看着我的iptables可以提供一个线索吗?
错误的Redhat实例sudo iptables -L
[ec2-user@ip-172-31-37-61 ~]$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT icmp -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
好的Amazon Linux:
[ec2-user@ip-172-31-36-174 ~]$ sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
令人沮丧的是几个小时,但是现在有了Amazon-linux,我可以再次进行。 噢!
谢谢
我的EC2安全组入站配置如下,端口8080正常运行。 它应该是类型自定义TCP规则,协议是TCP
下图将向您显示我的EC2安全组入站配置的屏幕截图
这是iptables的当前内容,包括我最近打开8080的尝试
[ec2-user@ip-172-31-37-61 ~]$ sudo cat /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
COMMIT
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.