iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
service iptables save
service iptables restart
参考:
http://www.cnblogs.com/ccdc/archive/2012/04/24/2468048.html
http://blog.chinaunix.net/uid-26495963-id-3279216.html
本文介绍如何使用iptables命令配置Linux防火墙,以允许外部访问MySQL数据库的3306端口。通过添加特定的iptables规则并保存重启服务确保规则生效。
iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 3306 -j ACCEPT
service iptables save
service iptables restart
参考:
http://www.cnblogs.com/ccdc/archive/2012/04/24/2468048.html
http://blog.chinaunix.net/uid-26495963-id-3279216.html
转载于:https://my.oschina.net/JustLoveIT/blog/495604
1202
184

被折叠的 条评论
为什么被折叠?