Centos关闭防火墙

时间:2015-05-03 22:06:05   收藏:0   阅读:104

1) 永久性生效,重启后不会复原

开启: chkconfig iptables on
关闭: chkconfig iptables off
2) 即时生效,重启后复原
开启: service iptables start
关闭: service iptables stop
查询TCP连接情况:
netstat -n | awk ‘/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}‘
查询端口占用情况:
netstat -anp | grep portno(例如:netstat –apn | grep 80)

 

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