firewall设置

一、查看活跃的区域

firewall-cmd --get-active-zones
public
  interfaces: eth0

以后就可以针对public进行设置

二、查看当前public区域开启的服务

firewall-cmd --permanent --zone=public --list-service
cockpit dhcpv6-client https ssh

三、添加服务

firewall-cmd --permanent --zone public --add-service https

移除服务

firewall-cmd --permanent --zone public --remove-service http

四、重启防火墙使设置生效

systemctl restart firewalld.service
原文地址:https://www.cnblogs.com/-rzx-/p/12731510.html