cd /etc/firewalld/zones/
vi public.xml

将允许访问的IP加入到public.xml即可

<?xml version="1.0" encoding="utf-8"?> Public 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.

加入白名单后,停止防火墙systemctl stop firewalld,再启动防火墙
systemctl start firewalld

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐