EC2 ERR_CONNECTION_REFUSED

情況:

AWS EC2 自訂 port 連線時Chrome出現

This site can’t be reached
ERR_CONNECTION_REFUSED

已經確認過:

  1. Instance use public domain name
  2. Security group 設定有開放inbound

問題:

instance內部防火牆

p.s. 該狀況平常by default應該不會出現,本次出現狀況是os 防火牆有另外被開啟

確認問題:

by aws forums:

A Connection Refused error is typically the result of a TCP reset when attempting 
to connect to a port. A firewall such as Linux' iptables with a policy of REJECT 
will result in a Connection Refused message, 
as will attempting to connect to a port on which there is no service running.

解法:

In the case of dmz try:

firewall-cmd --zone=dmz --add-port=2888/tcp --permanent

Otherwise, substitute dmz for your zone, for example, if your zone is public:

firewall-cmd --zone=public --add-port=2888/tcp --permanent

參考:

https://forums.aws.amazon.com/thread.jspa?threadID=62052

http://stackoverflow.com/questions/24729024/centos-7-open-firewall-port

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s