查看已开放端口
firewall-cmd --list-ports
开启防火墙
systemctl start firewalld
开放tcp端口(多个)
firewall-cmd --zone=public --add-port=6030-6042/tcp --permanent
开放udp端口(多个)
firewall-cmd --zone=public --add-port=6030-6042/udp --permanent
刷新防火墙策略
firewall-cmd --reload
关闭防火墙
systemctl stop firewalld