firewalld
1、firewalld的基本使用
启动: systemctl start firewalld
关闭: systemctl stop firewalld
查看状态: systemctl status firewalld
开机禁用 : systemctl disable firewalld
开机启用 : systemctl enable firewalld
2.service
启动一个服务:systemctl start firewalld.service
关闭一个服务:systemctl stop firewalld.service
重启一个服务:systemctl restart firewalld.service
显示一个服务的状态:systemctl status firewalld.service
在开机时启用一个服务:systemctl enable firewalld.service
在开机时禁用一个服务:systemctl disable firewalld.service
查看服务是否开机启动:systemctl is-enabled firewalld.service
查看已启动的服务列表:systemctl list-unit-files|grep enabled
查看启动失败的服务列表:systemctl --failed
防火墙关闭
临时关闭(重启恢复)
[root@localhost ~]# systemctl stop firewalld
永久关闭
[root@localhost ~]# systemctl disable firewalld
selinux
1、enforcing:强制模式,表示SELinux正在运行,且正在执行domain/type的限制(对domain/type的解释会在下面给出)
2、permissive:宽容模式,表示SELinux正在运行,但只会给出警告信息不会真正限制
3、disable:表示SELinux关闭
临时关闭
[root@localhost ~]# setenforce 0
永久关闭
[root@localhost ~]# vim /etc/selinux/config
SELINUX = disable
#将enforcing改成disable
重启生效
[root@localhost ~]# reboot