OS | CentOS6.6 |
インストールパッケージ | Web Server |
IPアドレスの取得 | DHCPより取得(192.168.0.100) |
>/etc/init.d/httpd status httpd は停止しています
>/etc/init.d/httpd start Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName [ OK ]
http://192.168.0.100
C:\Users\hoge>ping 192.168.0.100 192.168.0.100 に ping を送信しています 32 バイトのデータ: 192.168.0.100 からの応答: バイト数 =32 時間 <1ms TTL=64 192.168.0.100 からの応答: バイト数 =32 時間 <1ms TTL=64 192.168.0.100 からの応答: バイト数 =32 時間 <1ms TTL=64
>getenforce
Enforcing ← 有効
SELINUX=enforceing
を
SELINUX=disebled
に変更してLinuxを再起動します。
>/etc/init.d/httpd start Could not reliably determine the server's fully qualified domain name, using localhost.localdomain for ServerName [ OK ]
http://192.168.0.100
>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 >
>/etc/sysconfig/iptables iptables.ORG
1 # Firewall configuration written by system-config-firewall 2 # Manual customization of this file is not recommended. 3 *filter 4 :INPUT ACCEPT [0:0] 5 :FORWARD ACCEPT [0:0] 6 :OUTPUT ACCEPT [0:0] 7 -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT 8 -A INPUT -p icmp -j ACCEPT 9 -A INPUT -i lo -j ACCEPT 10 -A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT 11 -A INPUT -j REJECT --reject-with icmp-host-prohibited 12 -A FORWARD -j REJECT --reject-with icmp-host-prohibited 13 COMMIT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
>/etc/rc.d/init.d/iptables restart iptables: チェインをポリシー ACCEPT へ設定中filter [ OK ] iptables: ファイアウォールルールを消去中: [ OK ] iptables: モジュールを取り外し中: [ OK ] iptables: ファイアウォールルールを適用中: [ OK ]
http://192.168.0.100
>chkconfig --list | grep httpd httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
>chkconfig httpd on >chkconfig --list | grep httpd httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off