![](/img/trans.png)
[英]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.