0

Referring to this question it is possible to test if a certain TCP port is open on a specified IP via powershell.

test-netconnection -computername 8.8.8.8 -port 53

Is there a similar command for UDP ?

alfred
  • 621

2 Answers2

1

With TCP (assuming there is no firewall blocking you) the remote OS will answer you (the TCP handshake). There is no such thing for UDP, so there are only two ways you will get a response from the remote system:

  • If you send a valid UDP request for whatever program has bound the UDP port (in this case that would be a DNS request).
  • If you send an invalid request that causes the remote system to respond with an error.

Obviously if you get a response the port is open, however if you don't get a response you simply don't know if:

  • The port is closed or
  • The port is open and specifically not responding to you.
DavidT
  • 1,242
0

There is not a built-in already-existing tool in Windows for testing UDP network connections.

You can build a tool using PowerShell, but there is no PowerShell cmdlet or other Microsoft-published that already exists and is included in Windows that performs this function.

Some creative solutions I found:

music2myear
  • 49,799