netstat

作者: 好小葱1 | 来源:发表于2018-07-31 11:51 被阅读1次
    1. 列出所有连接

      $ netstat -a
      
    2. 禁用反向域名解析,加快查询下速度

      $ netstat -ant
      Active Internet connections (servers and established)
      Proto Recv-Q Send-Q Local Address           Foreign Address         State      
      tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN     
      tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     
      tcp        0      0 192.168.1.2:49058       173.255.230.5:80        ESTABLISHED
      tcp        0      0 192.168.1.2:33324       173.194.36.117:443      ESTABLISHED
      tcp6       0      0 ::1:631                 :::*                    LISTEN
      
    3. 只列出监听中的连接

      $ netstat -tnl
      Active Internet connections (only servers)
      Proto Recv-Q Send-Q Local Address           Foreign Address         State      
      tcp        0      0 127.0.1.1:53            0.0.0.0:*               LISTEN     
      tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN     
      tcp6       0      0 ::1:631                 :::*                    LISTEN
      

    相关文章

      网友评论

          本文标题:netstat

          本文链接:https://www.haomeiwen.com/subject/fnufvftx.html