Zabbixをインストールしたので、画面を見てみようと思ったら
アクセスできませんでしたT_T
Firewall(iptables)の設定を確認したところ。
[root@localhost ~]# 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 [root@localhost ~]#
80番ポートにアクセスできない!
というわけで、
以下の行を追加します。
# vi /etc/sysconfig/iptables ※viで開いた後に以下の行を追加します。 -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
iptablesを再起動します。
[root@localhost ~]# service iptables restart iptables: チェインをポリシー ACCEPT へ設定中filter [ OK ] iptables: ファイアウォールルールを消去中: [ OK ] iptables: モジュールを取り外し中: [ OK ] iptables: ファイアウォールルールを適用中: [ OK ] [root@localhost ~]#
再度確認。
[root@localhost ~]# 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 ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http 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 [root@localhost ~]#
Zabbixの画面にアクセスします。
無事、確認できました。