Wednesday, January 12, 2011

Check remote UDP connectivity from Linux

Hi there,
You all know how to check TCP port connectivity from a Linux or UNIX machine to a remote machine using telnet as per th example below
$ telnet 25

but we can't adopt TELNET to check UDP connectivity.

Linux and most of the UNIXes come with a network layer utility called nc (abbreviation for netcat) which is very useful to check UDP connectivity and to explore a lot with both TCP and UDP.

An example is shown below

# nc -v -u -z -w 3 123
Connection to 123 port [udp/ntp] succeeded!