firewall-cmd --reload 防火墙

文心思
2023-12-01

防火墙重新加载配置firewall-cmd --reload

查看开放的端口 firewall-cmd --list-ports

 

nano /etc/sysconfig/iptables

-A IN_public_allow -p tcp -m tcp --dport 9001 -m conntrack --ctstate NEW -j ACCEPT

 

nano /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 conn$
<service name="dhcpv6-client"/>
<service name="ssh"/>
<service name="openvpn"/>
<port protocol="tcp" port="9001"/>

</zone>

转载于:https://www.cnblogs.com/tonnytong/p/9098855.html

 类似资料: