1. 程式人生 > >firewalld與netfilter linux防火牆

firewalld與netfilter linux防火牆

selinux

臨時關閉selinux

[[email protected] ~]# setenforce 0

永久關閉linux

[[email protected] ~]# vim /etc/selinux/config #編輯配置檔案
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX= enforcing 將 #將enforcing改成disabled
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted
#reboot重啟隨後檢視狀態
[
[email protected]
~]# getenforce Disabled

關閉firewalld防火牆

centos7 防火牆 firewalld
centos6 防火牆 iptables

[[email protected] ~]# systemctl stop firewalld 暫時關閉防火牆
[[email protected] ~]# systemctl disable firewalld 永久關閉防火牆