centos6.6 shutting down firewalls and SELinux
1. View firewall status
[email protected] ~]# Service iptables Status
Table: Filter
Chain INPUT (Policy ACCEPT)
Num Target prot opt source destination
1 ACCEPT All – 0.0.0.0/0 0.0.0.0/0 State related,established
2 ACCEPT ICMP--0.0.0.0/0 0.0.0.0/0
3 ACCEPT All--0.0.0.0/0 0.0.0.0/0
4 ACCEPT TCP--0.0.0.0/0 0.0.0.0/0 state NEW TCP dpt:22
5 REJECT All--0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain FORWARD (Policy ACCEPT)
Num Target prot opt source destination
1 REJECT All--0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain OUTPUT (Policy ACCEPT)
Num Target prot opt source destination
2. Turn off firewall status
[[email protected] ~]# service iptables Stop
Iptables: Set the chain to policy accept:filter [OK]
Iptables: Clear Firewall rule: [OK]
Iptables: Uninstalling module: [OK]
[[Email protected] ~]# service iptables status
Iptables: Firewall is not running.
[[email protected] ~]# chkconfig iptables off //permanently shut down the firewall.
3. View SELinux Status
[Email protected] ~]# /usr/sbin/sestatus-v
SELinux status:enabled//indicates that SELinux has been started
SELINUXFS Mount:/selinux
Current mode:enforcing
Mode from config file:enforcing
Policy version:24
Policy from config file:targeted
4. Turn off SELinux to modify the startup configuration file
Vi/etc/selinux/config
Selinux=enforcing Change to Selinux=disabled
Reboot restart System
This article is from "Love_ Yao" blog, please be sure to keep this source http://20161215.blog.51cto.com/2276215/1782517
centos6.6 shutting down firewalls and SELinux