Linux 防火墙

Linux 防火墙


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 安装防火墙
yum install firewalld

# 查看开放的端口
firewalld-cmd --list-all

# 关闭防火墙
systemctl stop firewalld

# 禁用防火墙
systemctl disable firewalld

# 开启防火墙
firewall-cmd --zone=public --add-port=3306/tcp --permanent

# 刷新配置
firewall-cmd --reload