14.3-防火墙

系统安全

最基础的是内核保护

默认禁用

vim /etc/

防火墙

iptables
firewalld iptables 在 centos 系列的简化版
ufw iptables 在 debain 系列的简化版

systemctrl status firewall.service

四表五列

block dmz drop public trusted

防火墙规则修改

命令

# 自己用最简单的是关闭防护墙
systemctl status firewalld.service
systemctl stop firewalld.service

# 会下面的就够了
firewall-cmd --list-all
firewall-cmd --permanent --zone=public --add-service=http
firewall-cmd --permanent --zone=block --add-source=192.168.88.0/24
firewall-cmd --reload

视频中的命令

firewall-cmd --list-all
firewall-cmd --list-all-zone
firewall-cmd --get-services
firewall-cmd --permanent --zone=block --add-source 192.168.88.10/24 # 限制网段
firewall-cmd --permanent --zone=public --add-service=http  # 运行 http 服务访问
firewall-cmd --reload


dnf -y install httpd
systemctl stauts httpd
systemctl start httpd
curl http://127.0.0.1:80

上一节:14.2-破解密码