Linux Red hat/CentOS7关闭防火墙

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 查看防火状态
# CentOS7
systemctl status firewalld
# Red hat
service iptables status

# 暂时关闭防火墙
# CentOS7
systemctl stop firewalld
# Red hat
service iptables stop

# 重启防火墙
# CentOS7
systemctl enable firewalld
# Red hat
service iptables restart

# 永久关闭防火墙
# CentOS7
systemctl disable firewalld
# Red hat
chkconfig iptables off