linux下如何关闭防火墙

2018/10 15 11:10

  1. Centos6.x
  2. /etc/init.d/iptables stop
  3. chkconfig iptables off
  4. sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
  5. grep SELINUX=disabled /etc/selinux/config
  6. setenforce 0
  7. Centos7.x
  8. systemctl stop firewalld.service
  9. systemctl disable firewalld.service
  10. sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
  11. grep SELINUX=disabled /etc/selinux/config
  12. setenforce 0

--转载请注明: http://91o.cc/linux%e4%b8%8b%e5%a6%82%e4%bd%95%e5%85%b3%e9%97%ad%e9%98%b2%e7%81%ab%e5%a2%99/

作者 - 分类 未分类

发表回复

(必填)