防火墙服务:
开启防火墙服务:systemctl start firewalld / service firewalld start
关闭防火墙服务:systemctl stop firewalld / service firewalld stop
禁用防火墙服务:systemctl disable firewalld / service disable stop
开放防火墙服务端口:
例如开放端口8080:
firewall-cmd --permanent --add-port=8080/tcp
刷新:
firewall-cmd --reload
查看成功开放的端口:
firewall-cmd --list-ports
删除开放的端口:
firewall-cmd --permanent --remove-port=8080/tcp
刷新:
firewall-cmd --reload
查看成功开放的端口:
firewall-cmd --list-ports