Urgent.News

What's breaking now, across thousands of outlets.

Tech

Scanning for Open Ports and Vulnerabilities with Nmap

Nmap (Network Mapper) is an open-source network discovery tool that identifies hosts, services, and potential security issues. It's an essential tool for system administrators and developers to map a server's network, letting you see which ports are open, what services are running, and what operating system a target system is using. This guide covers key security tasks with Nmap, including…

Nmap (Network Mapper) is an open-source tool that discovers hosts, services, and potential security issues on a network. It helps system administrators and developers understand a server's network by identifying open ports, running services, and operating systems.

To begin, install Nmap on a Linux-based server as a non-root user with sudo privileges. The installation process varies depending on the operating system: for Debian/Ubuntu, use `sudo apt update && sudo apt install -y nmap`; for Rocky Linux and other RHEL-based systems, use `sudo dnf install -y nmap`. Verify the installation by running `nmap --version`.

A basic port scan is the first step, checking the 1,000 most common ports. Run this command: `sudo nmap localhost`. The output indicates open ports like 22 (SSH), 3001 (Nessus), and 5432 (PostgreSQL). Scan for specific service versions with the `-sV` flag, and detect the operating system with the `-O` flag.

The Nmap Scripting Engine (NSE) enables vulnerability detection. Install a sample FTP server, vsftpd, and intentionally create a vulnerability by enabling anonymous login. Use the `ftp-anon` script from NSE on port 21 to detect the vulnerability. The output reveals that anonymous FTP login is allowed, indicating the vulnerability.

To mitigate this vulnerability, edit the vsftpd configuration file to set `anonymous_enable=YES` to `anonymous_enable=NO` and restart the service. Nmap provides a powerful framework for network discovery, service identification, and vulnerability assessment, enabling system administrators to maintain secure and well-maintained systems.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Using the Linux IP Command to Manage Server Network Interfaces

The ip command is a built-in Linux network management utility that offers a wide range of features and tools for managing network interfaces.

  • ip command consolidates functions of older Linux network tools.
  • Use ip link show to view all network interfaces and their states.
  • Configure IP addresses with ip addr add and manage MTU with ip link set.

Using Curl

Curl is a command-line utility and underlying library (libcurl) used to transfer data across a wide range of network protocols, including HTTP, HTTPS, FTP, FTPS, SCP, SFTP, LDAP, MQTT, and more.

Playwright Email Tests Need a Cleanup Contract

Email-based end-to-end tests often look flaky for the wrong reason. A signup test creates a user, waits for a verification message, and sometimes finds an email that belongs to a previous run.

  • Email-based fixtures cause flakiness in end-to-end email tests.
  • Implement ownership contract for test mailboxes to improve reliability.
  • Clear contract includes ownership, readability, lifespan, and cleanup responsibilities.

More from Thursday 22 October →