Introduction
This is a guide for using the nmap tool to troubleshoot port connectivity. Nmap is a powerful port scanning tool that allows you to scan a server's ports and tell you their status.
Procedure
Nmap is a complex tool with a large number of features. However, for basic port troubleshooting, you can use the following syntax:
nmap --reason -p <ports> <IP address or domain name>
The following example is a nmap command to scan ports 22, 80, 443, and 1234 for cpanel.net:
[ root@184.94.197.2 [] ~]# nmap --reason -p 22,80,443,1234 cpanel.net
Starting Nmap 6.40 ( http://nmap.org ) at 2020-12-17 08:40 CST
Nmap scan report for cpanel.net (208.74.121.151)
Host is up, received echo-reply (0.0011s latency).
Other addresses for cpanel.net (not scanned): 208.74.123.84
PORT STATE SERVICE REASON
22/tcp open ssh syn-ack
80/tcp open http syn-ack
443/tcp open https syn-ack
1234/tcp filtered hotline port-unreach
Nmap done: 1 IP address (1 host up) scanned in 0.50 seconds
The output from this command shows that ports 22, 80, and 443 are open and listening while port 1234 is unreachable.
You can find more information about nmap commands, port states, and other documentation using the sources below:
What's the difference between a closed port and a filtered port?
What does the "filtered" status mean in an nmap scan?
https://nmap.org/book/man-port-scanning-basics.html
Comments
0 comments
Article is closed for comments.