2

Terraform を使用してリソースを作成していますが、サブネット 172.1.0.0 にノードがあり、セキュリティ グループやルールがノードに割り当てられていません。ノードには 22 と 80 の 2 つのエンドポイントがあります。

nmap を使用して、ポートが開いていることを確認しました。

nmap -Pn -sT -p T:11 some-ingress.cloudapp.net

Starting Nmap 6.47 ( http://nmap.org ) at 2016-07-08 19:02 EAT
Nmap scan report for some-ingress.cloudapp.net (1.2.3.4
Host is up (0.31s latency).
PORT   STATE SERVICE
22/tcp open  ssh

Nmap done: 1 IP address (1 host up) scanned in 1.34 seconds


nmap -Pn -sT -p T:80 some-ingress.cloudapp.net

Starting Nmap 6.47 ( http://nmap.org ) at 2016-07-08 19:02 EAT
Nmap scan report for some-ingress.cloudapp.net (1.2.3.4)
Host is up (0.036s latency).
PORT   STATE SERVICE
80/tcp open  http

Nmap done: 1 IP address (1 host up) scanned in 0.09 seconds

ノードに nginx をインストールして実行するcurl 172.1.0.4curl 127.0.0.1curl 0.0.0.0デフォルトの nginx ページが表示されます。

ただし、実行中curl <public ip>またはcurl <dns name>ハングすると、

curl: (56) Recv failure: Connection reset by peer

私のiptablesルールは次のとおりです。

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootpc
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:domain
ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:bootps
ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootps

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination  

ノードのパブリック IP で nginx にアクセスできないのはなぜですか?

ノードは仮想ネットワーク内172.1.0.0/16にあり、172.1.0.0/24必要に応じて Terraform 構成を投稿できます。

4

0 に答える 0