Sniff UDP packets on a local port

tcpdump supports UDP capturing. example usage:

tcpdump -n udp port 14550

Edit

Because your applications are communicating with lo interface you must specify interface like this:

tcpdump -i lo -n udp port 14550

this command print headers only. if you want to print data part of packet in hex and ASCII use this:

tcpdump -i lo -n udp port 14550 -X

or if you want to save packets to a file and see it's content in Wireshark use this:

tcpdump -i lo -n udp port 14550 -w packets.pcap

You can use ngrep. Example:

# Any UDP from any local interfaces to 91.22.38.4:12201
ngrep -W byline -d any udp and host 91.22.38.4 and dst port 12201

Tags:

Networking