1、运行、停止、禁用firewalld
启动:# systemctl start firewalld
查看状态:# systemctl status firewalld或者firewall-cmd --state
停止:# systemctl disable firewalld
禁用:# systemctl stop firewalld
2、vim /etc/firewalld/zones/public.xml
<?xml version="1.0" encoding="utf-8"?>
<zone>
<short>Public</short>
<description>For use in public areas. You do not trust the other computers on networks to not harm your computer. Only selected incoming connections are accepted.</description>
<service name="dhcpv6-client"/>
<service name="ssh"/> ****添加服务
<service name="https"/>
<port protocol="tcp" port="8080" /> *****添加端口
</zone>
参考:http://www.jb51.net/article/97964.htm
原文链接:https://www.f2er.com/centos/376708.html