关于Linux防火墙和selinux(一个保护通信,一个保护文件)

yum update -y更新linux系统  更新完init6重启(这一步和关闭防火墙没什么关系,仅仅是一个小知识点)


防火墙 ,会影响通信,默认拒绝所有,只允许远程登陆进和dhcp客户端通信,
#关闭防火墙:systemctl stop firewalld.service   #开机不允许启动:systemctl disable firewalld.service
防火墙是否关闭,systemctl status firewalld.service selinux
  美国NSA国家安全局设计的策略,旨在为将Linux中的文件分类并打标签,让不同的网络服务只能访问自己的文件,其他文件不能访问,这样就算某个服务被攻陷,也不会造成数据全部泄密
#关闭selinux root@pdun ~]# vim /etc/selinux/config SELINUX=enforcing 改为 SELINUX=disabled

 

#[root@pdun ~]# systemctl status firewalld.service

● firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)                                                                 #开机不自启
   Active: inactive (dead)         #dead关闭状态
     Docs: man:firewalld(1)


#查看selinux是否关闭
getenforce
查看防火墙、selinux是否关闭,

相关文章:

  • 2022-12-23
  • 2021-06-01
  • 2021-04-29
猜你喜欢
  • 2022-01-20
  • 2021-05-12
  • 2021-05-27
  • 2021-09-16
  • 2021-05-02
相关资源
相似解决方案