1、iptables
//stop(停止)
systemctl stop firewalld
//mask(注销)
systemctl mask firewalld
//install(安装)
yum install iptables-services
//status(状态)
service iptables status
//Start up(开机启动)
systemctl enable iptables
2、防火墙基础操作
//启动
systemctl start firewalld
//状态
systemctl status firewalld
//停止
systemctl stop firewalld
//禁用
systemctl disable firewalld
//开机启用
systemctl enable firewalld.service
//开机禁用
systemctl disable firewalld.service
//查看开机启用
systemctl is-enabled firewalld.service
//查看已启动的服务
systemctl list-unit-files|grep enabled
//查看启动失败的服务
systemctl --failed
//查询特定端口是否开放
firewall-cmd --query-port=80/tcp
//开放特定端口
firewall-cmd --permanent --add-port=80/tcp
//关闭特定端口
firewall-cmd --permanent --remove-port=8080/tcp
//查看已开放的端口
firewall-cmd --list-ports
//重启防火墙
firewall-cmd --reload
(防火墙配置信息调整后,重启防火墙后生效)