Richard Whitehouse
Richard Whitehouse

Reputation: 691

Broadcasting UDP messages across local network

Until a couple of days ago I had some software that was broadcasting udp messages to a port, which a different machine on the local network was receiving.

It seems like that process has stopped working but not sure why.

As a test script, running the below scripts:

\\ sender.ps1
$udpClient = New-Object System.Net.Sockets.UdpClient
$endpoint = New-Object System.Net.IPEndPoint ([System.Net.IPAddress]::Broadcast, 20777)
$data = [System.Text.Encoding]::ASCII.GetBytes("Test Message Here")
$udpClient.Send($data, $data.Length, $endpoint)
\\ receiver.ps1
$udpClient = New-Object System.Net.Sockets.UdpClient 20777
$endpoint = New-Object System.Net.IPEndPoint ([System.Net.IPAddress]::Any, 0)
while ($true) {
    $data = $udpClient.Receive([ref]$endpoint)
    Write-Output ("Received: " + [System.Text.Encoding]::ASCII.GetString($data))
}

When running on the same machine, the message is received, however when running on the sender, and one on the receiver, the receiver doesn't output anything.

NB These scripts have only been written for debugging my issue, so I can't say categorically that they would have worked before my issue started happening

I've tried disabling my firewall, but alas nothing seems to be coming through. Using arp -a on both machines, I can see the other corresponding machine.

What steps can I take to understand where the packets are going?

Thanks

Upvotes: 0

Views: 22

Answers (1)

Richard Whitehouse
Richard Whitehouse

Reputation: 691

NordVPN seems to be the issue so must have it's own firewall built in that's recently started blocking the messages.

Upvotes: 0

Related Questions