Mat*_*att 120 networking windows tcpip
在 Windows 中测试流量是否通过远程机器上的特定端口的简单方法是什么?
Isz*_*szi 97
哪个版本的Windows?对于 Windows 8/Server 2012 及更高版本,以下内容适用于 PowerShell:
Test-NetConnection 128.159.1.1 -Port 80
Run Code Online (Sandbox Code Playgroud)
一些谷歌搜索还会为运行低版本 Windows 的系统提供直接使用 .NET Framework 的替代方案(因为 PowerShell 允许您这样做)Test-NetConnection
。
如果您不反对使用第三方实用程序,Nmap也是一个非常好的朋友,它可以从命令行运行。
Pet*_*r M 76
前几天我从 Microsoft 找到了一个用于测试端口的 hiddem gem:
“Portqry.exe 是一个命令行实用程序,可用于帮助解决 TCP/IP 连接问题。Portqry.exe 可在基于 Windows 2000 的计算机、基于 Windows XP 的计算机和基于 Windows Server 2003 的计算机上运行。该实用程序会报告您选择的计算机上 TCP 和 UDP 端口的端口状态。”
Jør*_*ode 25
使用telnet命令连接到指定端口上的服务器,看是否可以建立连接。
成功:
$ telnet my_server 25
220 my_server ESMTP Postfix
Run Code Online (Sandbox Code Playgroud)
失败:
$ telnet my_server 23632
Connecting To my_server...Could not open connection to the host, on port 23632:
Connect failed
Run Code Online (Sandbox Code Playgroud)