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)

3 重启网路

 service network restart 或者 /etc/rc.d/init.d/network restart

 

 

 

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)

3 重启网路

 service network restart 或者 /etc/rc.d/init.d/network restart

 

 

 

相关文章:

  • 2021-11-26
  • 2021-06-18
猜你喜欢
  • 2021-12-26
  • 2021-11-10
  • 2022-01-02
  • 2021-07-01
  • 2021-12-22
  • 2021-07-13
相关资源
相似解决方案