centos6.5关闭防火墙命令

2019年10月31日22:44:33 评论 1,900
首月免费体验

1.永久性生效,重启后不会还原

开启: chkconfig iptables on

关闭: chkconfig iptables off

2.即时生效,重启后还原

开启: service iptables start

关闭: service iptables stop

3.查询TCP连接情况:

netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a, S[a]}'

4.查询端口占用情况:

netstat   -anp   |   grep  portno(例如:netstat –apn | grep 80)

weinxin
博主微信
这是我的微信扫一扫

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: