先自我介绍一下,小编浙江大学毕业,去过华为、字节跳动等大厂,目前阿里P7
深知大多数程序员,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年最新Linux运维全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友。
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上运维知识点,真正体系化!
由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新
如果你需要这些资料,可以添加V获取:vip1024b (备注运维)
正文
System administrators can manipulate(操作) the SELinux settings via the /etc/selinux/config
file. Here, you can set the SELinux mode and choose the policy to load at boot time.
系统管理员可以通过/etc/selinux/config
文件操作SELinux设置。在这里,您可以设置SELinux模式并选择在启动时加载的策略。
# 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
# SELINUXTYPE= can take one of three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
The settings in this file will take effect after a system reboot.
这个文件中的设置将在系统重启后生效。
这三种SELinux策略的范围从小到大可以理解为 “minimum” < “targeted” < “mls”。
- Minimum:这是最小的范围,只保护选定的进程。这是对"targeted"策略的一种修改,比"targeted"策略有更少的受保护的进程。
- Targeted:这个策略的范围比"minimum"大。它针对特定的系统进程进行保护,而其它进程则运行在传统的Discretionary
Access Control(DAC)环境下。这是默认的SELinux策略。- MLS (Multi Level Security):这是范围最大的策略,它为所有的系统进程提供了多级别的安全保护。
注意:
在这里,“targeted”和“minimum”是两种不同的SELinux策略类型。
- Targeted:这种策略只针对特定的系统进程进行保护,而其它进程则运行在传统的Discretionary Access Control(DAC)环境下。这是默认的SELinux策略。
- Minimum:这种策略是对"targeted"策略的修改。它只保护选定的进程,但比"targeted"策略有更少的受限制的进程。
所以说,“Targeted processes are protected”和“Only selected processes are protected”虽然看起来很像,但是它们所指的保护范围和级别是不同的。
Working with SELinux Booleans(使用SELinux布尔值)
SELinux booleans allow the administrator to modify SELinux settings on the fly(即时) without any need for policy recompilation(重编译). To get a list of all available SELinux booleans, you can use:
SELinux布尔值允许管理员即时修改SELinux设置,无需重新编译策略。要获取所有可用的SELinux布尔值列表,您可以使用:
getsebool -a
To set a particular boolean value, use the setsebool
command:
要设置特定的布尔值,请使用setsebool
命令:
setsebool -P httpd_can_network_connect 1
In this example, we’re allowing the HTTPD daemon to make(建立) network connections.
在此示例中,我们允许HTTPD守护进程进行网络连接。
getsebool -a
setsebool -P httpd_can_network_connect 1
Conclusion
结论
While it might seem complex at first, SELinux is an extremely powerful tool that allows system administrators to have fine-grained(细粒的) control over their systems’ security. It offers a higher level of access control and process separation(进程隔离) than traditional Unix permissions models. Understanding how to work with SELinux can significantly enhance your system’s security posture.
虽然一开始可能看起来很复杂,但SELinux是一个非常强大的工具,它允许系统管理员对他们的系统安全性进行精细控制。它提供了比传统Unix权限模型更高级别的访问控制和进程分离。理解如何使用SELinux可以显著增强您的系统的安全态势。
网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。
需要这份系统化的资料的朋友,可以添加V获取:vip1024b (备注运维)
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!
(备注运维)**
[外链图片转存中…(img-GJegQazP-1713173329437)]
一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!