什么是绑定此端口?


9

什么是我的80端口上提供内容,但我不知道是什么过程是这样做的。有没有办法找出哪个进程绑定到哪个端口?

更新: 这是...的输出,netstat可惜的是,似乎没有任何东西绑定端口80。尽管我的端口80仍在提供信息。这是不可能的,还是我错过了什么?(见下文)

更新: 运行netstat -anbo并与Taskmanager中的进程进行交叉引用后,我发现它skypekit.exe绑定了我的端口80。但是,对该问题的任何进一步探讨都可能不在此问题的范围之内。只需添加一下,Trillian就使用80和443端口skypekit.exe及其流量。

PS D:\> netstat -anbo

Active Connections

  Proto  Local Address          Foreign Address        State           PID
  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       6664
 [skypekit.exe]
  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING       1280
  RpcSs
 [svchost.exe]
  TCP    0.0.0.0:443            0.0.0.0:0              LISTENING       6664
 [skypekit.exe]
  TCP    0.0.0.0:445            0.0.0.0:0              LISTENING       4
 Can not obtain ownership information
  TCP    0.0.0.0:1025           0.0.0.0:0              LISTENING       916
 [wininit.exe]
  TCP    0.0.0.0:1026           0.0.0.0:0              LISTENING       1480
  eventlog
 [svchost.exe]
  TCP    0.0.0.0:1027           0.0.0.0:0              LISTENING       1568
  Schedule
 [svchost.exe]
  TCP    0.0.0.0:1028           0.0.0.0:0              LISTENING       980
 [lsass.exe]
  TCP    0.0.0.0:1029           0.0.0.0:0              LISTENING       568
 [spoolsv.exe]
  TCP    0.0.0.0:1030           0.0.0.0:0              LISTENING       956
 [services.exe]
  TCP    0.0.0.0:2987           0.0.0.0:0              LISTENING       308

我的端口80上正在提供内容 ... 我的端口80仍在提供信息正在告诉您什么/给您留下了从该端口提供内容的印象?
鲍勃

见我的答案,你需要的-anb不是-b只!(a提供监听端口)
RedGrittyBrick 2012年

@RedGrittyBrick:我已经对其进行了更新(尽管我必须添加该-o标志才能获取PID)...
2012年

Answers:


16

尝试 netstat -anb

C:\> netstat -anb

Active Connections

  Proto  Local Address          Foreign Address        State           PID
  TCP    0.0.0.0:80             0.0.0.0:0              LISTENING       1724
  [Apache.exe]

更新:这一个-anb是有原因的!

C:\> netstat /?

Displays protocol statistics and current TCP/IP network connections.

NETSTAT [-a] [-b] [-e] [-n] [-o] [-p proto] [-r] [-s] [-v] [interval]

  -a            Displays all connections and listening ports.
                                         ^^^^^^^^^^^^^^^^^^^^
                                         ||||||||||||||||||||

位置在哪里netstat?因为它可能不在我的PATH上。
2012年

@Pepijn:%windir%/ System32吗?
RedGrittyBrick'4

是的...有些东西破坏了我的路径...所以我想我发现了部分问题。谢谢。^^
wen

@Pepijn如果system32超出您的范围,您如何运行cmd?这有点令人困惑。
鲍勃

1
@BOb:通过开始搜索,它只是在哪里找到cmd.exe文件...我猜是吗?^^
2012年

4

为了将来参考,Sysinternals提供了许多很棒的工具来发现您的计算机上正在发生的事情。 例如,tcpview可以为您提供TCP / UDP套接字的实时监控,filemon可以向您显示与文件访问相关的活动...列表不胜枚举。


0

一种方法是使用 netstat -anbo

Active Connections

  Proto  Local Address          Foreign Address        State           PID
  TCP    0.0.0.0:21             0.0.0.0:0              LISTENING       7908
 [filezillaserver.exe]
  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING       468
  RpcSs
 [svchost.exe]
  TCP    0.0.0.0:443            0.0.0.0:0              LISTENING       4588
 [vmware-hostd.exe]

停止vmware-hostd之后,它应该启动了。


0

只需运行此PowerShell命令,您将看到侦听进程的名称,例如443。

Get-Process -Id (Get-NetTCPConnection -LocalPort 443).OwningProcess

Handles NPM(K)    PM(K)     WS(K)     CPU(s)     Id SI ProcessName
------- ------    -----     -----     ------     -- -- -----------
    143     15     3448     11024             4572 0 MySuperServer
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.