Tuesday, April 29, 2008

HowTo: UDP Connectivity Host Test

Are you wondering how would you be able to test and probe a port that listens for UDP connections? Or how would you test a listening UDP port?

How to test a listening UDP port

If you have managed to create a daemonized service that opens port for UDP connections, here's how to test that listening UDP port for UDP connections. Read on.

To test a listening UDP port, simply use nmap.

# nmap -p [port] -sU -P0 [host name | ip address]
# nmap -p 123 -sU -P0 example.com
# nmap -p 123 -sU -P0 123.123.123.123

From the command shown above, I am assuming that the host example.com is currently serving NTP service on UDP port 123.

Sample opened UDP port output:
~~~~~~~~~~~~~~~~~~~
Starting Nmap 4.52 ( http://insecure.org ) at 2008-04-29 10:56 WAT
Interesting ports on host.example.com (123.123.123.123):
PORT STATE SERVICE
123/udp open|filtered ntp
MAC Address: 00:02:A5:EC:00:8C (Compaq Computer)

Nmap done: 1 IP address (1 host up) scanned in 1.043 seconds
~~~~~~~~~~~~~~~~~~~

Not only you get to test and scan the UDP port, you also get the host's current MAC address.

If you have a closed UDP port, you should be seeing similar lines as shown
~~~~~~~~~~~~~~~~~~~
Interesting ports on localhost (127.0.0.1):
PORT STATE SERVICE
123/udp closed ntp
~~~~~~~~~~~~~~~~~~~

Goodluck.

Similar Posts:
Nmap Port Scanning
Install NMap GUI FrontEnd
List Out Opened Linux Ports
MAC Address Network Scan

0 comments:

Sign up for PayPal and start accepting credit card payments instantly.
ILoveTux - howtos and news | About | Contact | TOS | Policy