linux中iptables初学笔记

时间:2014-09-05 17:48:11   收藏:0   阅读:354

centos中对iptables进行管理实例:

对固定网段进行3306端口开放

-bash-3.2# iptables -I INPUT -s 121.124.152.0/22 -p tcp --dport 3306 -j ACCEPT
-bash-3.2# iptables -I INPUT -s 111.87.191.0/28 -p tcp --dport 3306 -j ACCEPT
-bash-3.2# /etc/init.d/iptables save

-bash-3.2# service iptables restart

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!