赞
踩
1. 查看防火墙端口开放列表
firewall-cmd --list-all
2. 指定ip端口
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.1.100" port protocol="tcp" port="3306" accept"
连续端口
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.1.100" port protocol="tcp" port="3306-3309" accept"
ip网段
firewall-cmd --permanent --add-rich-rule="rule family="ipv4" source address="192.168.1.0/24" port protocol="tcp" port="3306" accept"
3.重新载入,使配置生效
firewall-cmd --reload
4.删除规则
firewall-cmd --permanent --remove-rich-rule="rule family="ipv4" source address="192.168.1.100" port protocol="tcp" port="3306" accept"
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。