nmap Command: Tutorial & Examples
Scan for open ports and services
Nmap (short for "Network Mapper") is a free and open-source utility for network exploration and security auditing. It allows you to scan networks to identify hosts and the services they offer, as well as to detect open ports and vulnerabilities.
To use Nmap, you will need to install it on your system. Once it is installed, you can use the following command to scan for open ports on a specific host:
nmap <hostname or IP address>
Nmap will then scan the host and report back on any open ports it finds. You can also specify a range of ports to scan, or use options such as -sT
to perform a TCP connect scan
or -sU
to perform a UDP scan.
It's worth noting that running a port scan on a host without permission is generally considered a malicious activity and is often illegal. Therefore, it is important to only use Nmap for legitimate purposes and to obtain permission before scanning any hosts.
CleverUptime uses nmap
to scan for open ports on your servers after you have given the permission to do so.
Further Reading
- The Ultimate Kali Linux Book by Glen D. Singh
- The Shellcoder's Handbook: Discovering and Exploiting Security Holes by Chris Anley, John Heasman, Felix Lindner, Gerardo Richarte
- Mastering Linux Security and Hardening by Donald A. Tevault
- Learning Kali Linux: Security Testing, Penetration Testing & Ethical Hacking by Ric Messier
- Security Strategies in Linux Platforms and Applications by Ric Messier, Michael Jang
- Linux Hardening in Hostile Networks by Kyle Rankin
- Mastering Defensive Security by Cesar Bravo
- Linux Security Cookbook by Daniel J. Barrett, Richard E. Silverman, Robert G. Byrnes
- Linux Firewalls: Attack Detection and Response by Michael Rash