Q&A
AWS EC2 に CentOS + Apache で Web サーバを建てたのですが、外部から接続できず、切り分けに困っています。
状況
・Web サーバへのアクセスが、time out してしまう。
切り分け状況
・IPv4 パブリック IP への http アクセス(ブラウザからのアクセス)は time out
・Web サーバ自体で、パブリック IP に curl を実施するとcurl: (7) couldn't connect to host
・Web サーバ自体で、localhost へ curl すると、「Apache HTTP Server Test Page powered by CentOS」に接続できる
・Web サーバ自体で、プライベート IP へ curl すると、「Apache HTTP Server Test Page powered by CentOS」に接続できる
・外部から、IPv4 パブリック IP への ssh は問題なく動作中
netstat -tanp Active Internet connections (servers and established) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name … tcp 0 0 :::80 :::* LISTEN - …
セキュリティグループ ポート プロトコル ソース 80 tcp 0.0.0.0/0 22 tcp 0.0.0.0/0 443 tcp 0.0.0.0/0
sudo iptables --list 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
実施項目
・SELinux の Disable
Web サーバは機能しており、パブリック IP のみ弾いているので
なんだかものすごく初歩のところを忘れているんだと思います。。。
ご協力お願いします。
回答1件
あなたの回答
tips
プレビュー
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。