Scan Network Ports with Nmap

Kali LinuxKali LinuxBeginner
Practice Now

Introduction

In this challenge, you'll step into the role of a cybersecurity intern tasked with auditing a server's security. Your objective is to utilize Nmap, a powerful network scanning tool, to identify open ports on a target system with the IP address 172.17.0.1.

The challenge requires you to execute an Nmap scan against the specified IP address and save the scan results to a file named open_ports.txt located in the /root directory. You'll need to use the -oN option with the nmap command to achieve this. The successful completion of this challenge will demonstrate your ability to use Nmap for basic port scanning and result saving.


Skills Graph

%%%%{init: {'theme':'neutral'}}%%%% flowchart RL kali(("Kali")) -.-> kali/KaliGroup(["Kali"]) kali/KaliGroup -.-> kali/file_ctrl("File Management") kali/KaliGroup -.-> kali/nmap_ops("Nmap Tool") subgraph Lab Skills kali/file_ctrl -.-> lab-552280{{"Scan Network Ports with Nmap"}} kali/nmap_ops -.-> lab-552280{{"Scan Network Ports with Nmap"}} end

Scan Network Ports with Nmap

As a cybersecurity intern, you're tasked with auditing a server's security. Your goal is to use Nmap to identify open ports on a target system and save the results for analysis.

Tasks

  • Use Nmap to scan the target IP address 172.17.0.1 and identify open ports.
  • Save the Nmap scan results to a file named open_ports.txt in the /root directory.

Requirements

  1. You must use the nmap command to scan the target IP address.
  2. You must save the Nmap scan results to a file named open_ports.txt in the /root directory using the -oN option.
  3. The target IP address to scan is 172.17.0.1.

Examples

After successfully completing the challenge, the open_ports.txt file in the /root directory should contain output similar to the following:

Starting Nmap 7.95 ( https://nmap.org ) at 2025-04-14 01:53 UTC
Nmap scan report for 172.17.0.1
Host is up (0.0000090s latency).
Not shown: 997 closed tcp ports (reset)
PORT     STATE SERVICE
22/tcp   open  ssh
3000/tcp open  ppp
3001/tcp open  nessus
MAC Address: 02:42:08:44:B4:FF (Unknown)

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

Hints

Remember to use the -oN option with nmap to save the scan results to a file. Ensure you have the correct IP address for the target system.

โœจ Check Solution and Practice

Summary

In this challenge, the task is to use Nmap to scan the target IP address 172.17.0.1 and identify open ports. The key learning point is how to use the nmap command with the -oN option to save the scan results to a file named open_ports.txt in the /root directory.

The verification steps confirm the correct execution of the Nmap command with the specified IP address and output file, as well as the successful creation of the open_ports.txt file containing the scan results.