How to do UDP Ping with Linux


UDP Ping is really useful especially to see if SNMP is running. The syntax for UDP checking commands is a bit obscure so we’ve listed a few variants. Our favourite is nc also knows as nmap-ncat. Here is the command syntax to test if an UDP port is listening with nc. Be sure to use the v verbose switch to get the full story.

nc -zvu serverxyz.abc.com 161
Connection to serverxyz.abc.host 161 port [udp/snmp] succeeded!

Or try this (not working version – see 0 bytes received):

[[email protected] ~]# nc -zvu 161
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Connected to
Ncat: UDP packet sent successfully
Ncat: 1 bytes sent, 0 bytes received in 2.01 seconds.

And here are some alternate methods:

sudo nmap -sU -p port target
nping –udp -p port target
hping3 -S –udp -p port target


How to Check Remote Ports are Reachable Using ‘nc’ Command

Ping UDP/TCP Port

Share this article

Share on facebook
Share on twitter
Share on linkedin

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top