How to turn off seLinux and iptables firewall in CentOS 6.5 system

  
                  

CentOS 5 completely shut down SELinux

Open /etc/selinux/config with vim

Comment it with a # in front of SELINUX=enforcing #SELINUX=enforcing

Then add a new line SELINUX=disabled

Save, exit, restart the system, and get it.

Centos to turn off the firewall

Execute the ”setup” command to start the text mode configuration utility, select ”firewall configuration” in ”select a tool”, and then select ” Run the tool & rdquo; button, the firewall configuration interface appears, set the security level & rdquo; set & rdquo; disable & rdquo;, then select & rdquo; OK & rdquo; can.

Or use the command:

#/sbin/iptables -I INPUT -p tcp –dport 80 -j ACCEPT #/sbin/iptables -I INPUT -p tcp –dport 22 -j ACCEPT #/etc/rc.d/init.d/Iptables save

After restarting the computer, the firewall has already opened ports 80 and 22 by default.

It should also be possible to restart the computer: #/etc/init.d/iptables restart

Close the firewall and shut down its services:

View the firewall information: #/etc/init.d/iptables status

Turn off the firewall service: #/etc/init.d/Iptables stop

Permanently closed? I don't know how to make a permanent method: #chkconfig –level 35 iptables off

Copyright © Windows knowledge All Rights Reserved