0
0
Cybersecurityknowledge~30 mins

Port scanning with Nmap in Cybersecurity - Mini Project: Build & Apply

Choose your learning style9 modes available
Port scanning with Nmap
📖 Scenario: You are a network administrator who needs to check which ports are open on a server to ensure security and proper service operation.
🎯 Goal: Learn how to perform basic port scanning using the nmap tool to identify open ports on a target machine.
📋 What You'll Learn
Understand what a port is and why scanning ports is useful
Use nmap to scan a specific IP address
Use nmap to scan a range of ports
Interpret the basic output of nmap scans
💡 Why This Matters
🌍 Real World
Network administrators and cybersecurity professionals use port scanning to check which services are accessible on a server and to identify potential security risks.
💼 Career
Understanding how to perform and interpret port scans is essential for roles in network security, system administration, and ethical hacking.
Progress0 / 4 steps
1
Set up the target IP address
Create a variable called target_ip and set it to the string "192.168.1.1", which represents the IP address of the server you want to scan.
Cybersecurity
Need a hint?

The IP address should be a string assigned to the variable target_ip.

2
Set up the port range to scan
Create a variable called port_range and set it to the string "1-1000", which defines the range of ports you want to scan on the target IP.
Cybersecurity
Need a hint?

The port range should be a string assigned to the variable port_range.

3
Write the Nmap scan command
Create a variable called scan_command and set it to the string that runs nmap with the -p option for ports, scanning the port_range on the target_ip. Use the format: "nmap -p {port_range} {target_ip}" with f-string syntax.
Cybersecurity
Need a hint?

Use an f-string to insert port_range and target_ip into the command string.

4
Explain the purpose of the scan command
Add a comment above the scan_command variable explaining that this command will scan ports 1 to 1000 on the target IP address to find which ports are open.
Cybersecurity
Need a hint?

The comment should clearly state the purpose of the scan_command.