systemctl start firewalld
systemctl status firewalld
systemctl stop firewalld
firewall-cmd --permanent --zone=public --add-port=80/tcp
firewall-cmd --list-ports
#重启firewall
firewall-cmd --reload
#停止firewall
systemctl stop firewalld.service
#禁止firewall开机启动
systemctl disable firewalld.service
2、安装iptables防火墙
yum install iptables-services -y
3.启动设置防火墙
# systemctl enable iptables
# systemctl start iptables
4.查看防火墙状态
systemctl status iptables
systemctl restart iptables.service #重启防火墙使配置生效
systemctl enable iptables.service #设置防火墙开机启动
©2018-2020 hongshali.com 版权所有 ICP证:闽ICP备18029655号-1