Centos7防火墙放行指定IP和端口

1、放行指定端口

#添加指定需要开放的端口: firewall-cmd --add-port=123/tcp --permanent

#重载入添加的端口: firewall-cmd --reload

#查询指定端口是否开启成功: firewall-cmd --query-port=123/tcp

放行指定IP

firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="172.16.110.55" accept"

#重新载入 firewall-cmd --reload

原文地址:https://www.cnblogs.com/wangfan9/p/14189924.html