In the process of deploying a new virtual machine that hosts an Apache web server, a Linux administrator has opened port 80 on the server's firewall and added the host record to DNS. From a workstation on a different subnet, the administrator now needs to verify two things: (1) that the web daemon is actually bound to TCP port 80 on the new server, and (2) that the port can be reached end-to-end across the network. The administrator prefers to perform both checks with a single command-line tool that requires no configuration changes on the remote host. Which command should be used?
The nmap command can test connectivity to a specific TCP port on a remote host and report whether that port is open. By specifying the -p option with 80 (the default HTTP port) and the target's IP address, nmap sends the necessary probe packets and interprets the response, confirming both that the service is listening and that the port is reachable. openssl s_client focuses on initiating an SSL/TLS handshake; when pointed at an unencrypted HTTP port it typically hangs or errors, so it is not ideal for simple port-reachability tests. netstat displays sockets on the local system only and cannot interrogate a remote host. dig is used for DNS lookups, not for checking open ports.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the -p option in nmap do?
Open an interactive chat with Bash
Why can't openssl s_client be used to test HTTP ports?