启动防火墙
1 | systemctl start firewalld |
禁用防火墙
1 | systemctl stop firewalld |
设置开机启动
1 | systemctl enable firewalld |
停止并禁用开机启动
1 | sytemctl disable firewalld |
重启防火墙
1 | firewall-cmd --reload |
查看状态
1 | systemctl status firewalld或者 firewall-cmd --state |
查看版本
1 | firewall-cmd --version |
查看开放的端口
1 | firewall-cmd --list-port |
开放端口
1 | firewall-cmd --zone=public --add-port=80/tcp --permanent |