------检查防火墙状态 # iptables -L -n Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited Chain FORWARD (policy ACCEPT) target prot opt source destination REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited Chain OUTPUT (policy ACCEPT) target prot opt source destination --------永久关闭防火墙 [root@hisdbdg yum.repos.d]# chkconfig iptables off ---------立即关闭防火墙,但是重启后会失效 # service iptables stop iptables:将链设置为政策 ACCEPT:filter [确定 iptables:清除防火墙规则: [确定 iptables:正在卸载模块: [确定 ---------检查防火墙运行状态 # service iptables status iptables:未运行防火墙。
|