Skip to content

Instantly share code, notes, and snippets.

@technicool
Created June 8, 2026 18:31
Show Gist options
  • Select an option

  • Save technicool/8995b0629927a9e251988db167aa6498 to your computer and use it in GitHub Desktop.

Select an option

Save technicool/8995b0629927a9e251988db167aa6498 to your computer and use it in GitHub Desktop.

To listen for UDP multicast packets, the standard nc (netcat) utility is usually insufficient on its own because it lacks native IGMP join support. You must use socat or an updated netcat variant like ncat (from Nmap) to successfully join the multicast group and see the traffic.Here are the exact commands to accomplish this, ordered by reliability.

socat

This is the most reliable tool for multicast because it explicitly handles the IGMP group join request and can display the source IP address.

socat -v UDP4-RECVFROM:9131,ip-add-membership=239.255.250.250:0.0.0.0,fork -
  • -v: Dumps the packet contents (text format) and metadata.
  • UDP4-RECVFROM:9131: Listens on UDP port 9131 and logs the sender's source IP.
  • ip-add-membership=...: Joins the multicast group. 0.0.0.0 uses your default network interface.

Response

Here's what the response will look like after a few seconds:

> 2026/06/08 13:26:04.265993  length=204 from=0 to=203
AMXB<-UUID=GlobalCache_000C1E072BBB><-SDKClass=Utility><-Make=GlobalCache><-Model=iTachIP2SL><-Revision=710-1009-05><-Pkg_Level=GCPK001><-Config-URL=http://10.0.0.4><-PCB_PN=025-0027-11><-Status=Ready>\rAMXB<-UUID=GlobalCache_000C1E072BBB><-SDKClass=Utility><-Make=GlobalCache><-Model=iTachIP2SL><-Revision=710-1009-05><-Pkg_Level=GCPK001><-Config-URL=http://10.1.1.174><-PCB_PN=025-0027-11><-Status=Ready>
``

you see the ip address / url provided is: `http://10.0.0.4`

#!/bin/sh
## socat handles IGMP joins and shows source IPs. also dumps the xml
socat -v UDP4-RECVFROM:9131,ip-add-membership=239.255.250.250:0.0.0.0,fork -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment