NMAP, standing for Network Mapper, is an open-source tool for security auditing and network discovery. It scans for open ports in your network and determines if those doors, to help secure your system. Before showing step-by-step to use NMAP, the first thing you need to know is what ports and NMAP are, and their importance for network security.
Ports act like gateways, and they are associated with particular protocols and services. For example, Port 80 is related to HTPP service, and port 443, with HTTPS. Ensuring that only needed ports are open is an essential part of cyber hygiene because each open port represents a potential area for hackers to exploit (Fruhlinger, 2020). You can find more information at CSO Online.
NMAP is an essential tool in the cybersecurity field, used for network exploration, security auditing. But, it’s important to know that it must be used cautiously and responsibly since it grants you considerable power (Aitel, 2006). More information can be found on NMAP.org.
Now, let’s go step-by-step on how to use NMAP and check if a port is open:
Step 1: Install NMAP
You can download it from nmap.org. Choose the appropriate operating system, download and install it like any other software.
Step 2: Open a Terminal Window
NMAP is a command-line tool – thus, you need to launch your system terminal for MAC/ Linux, or cmd for Windows.
Step 3: Basic Commands
- To scan a single port: the command is “nmap -p port target”. Replace ‘port’ with the port number and ‘target’ with the hostname or IP you intend to check (Davies, 2021). For example, “nmap -p 80 www.google.com”. If the port 80 in google is open, it will display the status as “open” (Engebretson, 2019).
- To scan multiple ports: the command is “nmap -p first_port-last_port target”. Replace ‘first_port-last_port’ with the range of ports you’d like to scan (Cisco, 2016).
Always remember using NMAP to scan other’s private networks without permission is illegal. More examples of how to use NMAP are on Cisco’s cybersecurity learning labs.
Sources:
1. Fruhlinger, J. (2020). Port scanning: The Pgysical Steps of a Cyber Attack. CSO Online. https://www.csoonline.com/article/3428674/what-is-port-scanning.html
2. Aitel, D. (2006). The Art of Port Scanning. Nmap. https://nmap.org/book/man-port-scanning-basics.html
3. Davies, H. (2021). Everything You Need to Know About Open Ports. Comparitech. https://www.comparitech.com/net-admin/open-closed-ports/
4. Engebretson, P. (2019). The Basics of Hacking and Penetration Testing: Ethical Hacking and Penetration Testing Made Easy. Elsevier.
5. Cisco. (2016). Introduction to Nmap. https://learningnetwork.cisco.com/s/article/introduction-to-nmap