linux 防火墙添加端口

时间:2015-05-12 18:42:35   收藏:0   阅读:284

1.在防火墙上添加端口

iptables -I INPUT -p tcp --dport 80 -j ACCEPT  //80为web服务发布端口
iptables -I INPUT -p tcp --dport 22 -j ACCEPT  //22为ssh服务端口
2.保存服务的配置
service iptables save
3.重启防火墙服务
service iptables restart
4.查看防火墙
service iptables status

原文:http://www.cnblogs.com/huff/p/4497965.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!