ystemctl start firewalld # 启动systemctl status firewalld # 或者 firewall-cmd --state 查看状态systemctl disable firewalld # 停止systemctl stop firewalld # 禁用
Bash
firewall-cmd --enable service=ssh
Bash
firewall-cmd --disable service=ssh
Bash
firewall-cmd --enable ports=8080/tcp
Bash
firewall-cmd --enable service=samba --timeout=600
Bash
firewall-cmd --zone=public --list-ports
firewall-cmd --list-services
Bash
firewall-cmd --permanent --zone=internal --add-service=http firewall-cmd --reload # 在不改变状态的条件下重新加载防火墙
Bash
firewall-cmd --add-port=443/tcp
Bash
firewall-cmd --zone=public --add-port=3690/tcp --permanent
Bash
firewall-cmd --reload