对指定ip开放指定端口

命令

firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.5.1" port protocol="tcp" port="6379" accept"

重启

systemctl restart firewalld.service
Logo

更多推荐