防火墙指定ip配置 端口
- firewall-cmd --permanent --add-rich-rule=‘rule family=“ipv4” source
address=“172.22.38.0/24” port protocol=“tcp” port=“2375” accept’ - firewall-cmd --permanent --add-rich-rule=‘rule family=“ipv4” source
address=“172.22.39.0/24” port protocol=“tcp” port=“2375” accept’ - firewall-cmd --permanent --add-rich-rule=‘rule family=“ipv4” source
address=“172.22.40.0/24” port protocol=“tcp” port=“2375” accept’
删除指定端口
firewall-cmd --permanent --remove-port=2375/tcp
查看防火墙策略
firewall-cmd --list-all
删除策略
firewall-cmd --permanent --remove-rich-rule=‘rule family=“ipv4” source address=“172.22.38.0/24” port protocol=“tcp” port=“2375” accept’