Русский flag Русский

Network Troubleshooting for Beginners: Is the Door Open? (Ports)

Published on 2025-09-15

Introduction

A server’s IP address is like the postal address of an apartment building. But to reach the right apartment, you need the door number. In networking, these doors are ports.

  • HTTP runs on port 80.
  • HTTPS — on port 443.
  • Mail, databases, and other services listen on their own ports.

If a port is closed or nothing is listening on it, the site won’t open — even if the server is “alive.”

Today we’ll learn how to check port availability using telnet, nc, and also see what’s listening on your own computer with netstat and ss.


telnet — Classic Way to Check a Door

What does it do?

Creates a simple text connection to the specified port.

Usage

telnet <server_address> <port_number>

Example:

telnet google.com 443

Results

Success:

Trying 142.250.184.110...
Connected to google.com.
Escape character is '^]'.

Connection established → port is open.

Failure:

Connecting To google.com...Could not open connection to the host, on port 443: Connect failed
  • Connection refused — the door exists but it’s locked.
  • Connection timed out — nobody is answering (or a firewall is blocking it).

⚠️ On Windows, the Telnet client is disabled by default. Enable it in Control Panel → Programs and Features → Turn Windows features on or off.


nc (netcat) — The Swiss Army Knife 🔪

netcat is more convenient and faster than telnet, giving clear answers.

Usage

nc -zv <server_address> <port_number>

Flags:

  • -z — scan only, no data transfer.
  • -v — verbose output.

Examples

Success:

Connection to google.com port 443 [tcp/https] succeeded!

Failure:

nc: connect to google.com port 81 (tcp) failed: Connection refused

👉 Conclusion: nc -zv is the most convenient way to check ports.


What’s Listening on My Computer?

To see which ports are open locally:

netstat

netstat -an

Works on Windows, macOS, and Linux. Shows all active connections and ports in LISTEN / LISTENING status.

ss (Linux, modern alternative)

ss -tuln
  • t — TCP
  • u — UDP
  • l — listening ports only
  • n — show port numbers instead of service names

Example:

tcp    LISTEN  0  128  0.0.0.0:22   0.0.0.0:*

Here an SSH server is listening for connections on port 22.


Conclusion

Now you know how to:

  • Check port availability on a remote server (telnet, nc).
  • See which ports are listening on your computer (netstat, ss).

This helps distinguish between:

  • “Server is unreachable” and
  • “Server is reachable, but the specific service isn’t working.”

What’s Next?

We’ve looked at basic, narrow-purpose tools. But there are multipurpose tools that combine several functions and give a broader picture.

In the next article, we’ll explore mtr, nmap, and curl — true all-in-one diagnostic utilities.


Resources

Related reviews

Huge thanks to Mikhail for the work — I'm very pleased with the result. Special thanks for his recommendations during setup: from my rather muddled brief (I know little about servers), Mikhail, through clarifying questions and suggestions, formed a clear understanding of what the final build would accomplish and how best to organize everything. I recommend him!

ladohinpy · MikroTik hAP router setup. I'll set up a MikroTik Wi‑Fi router for you.

2025-07-21 · ⭐ 5/5

Many thanks to Mikhail for the work, I am very pleased with the result. I especially thank him for the recommendations during the setup process — from my rather muddled brief (and I know little about servers) Mikhail, with clarifying questions and suggestions of his own, formulated a clear understanding of what tasks the final build will solve and how to organize everything in the best way. I recommend!

An excellent specialist, a savvy expert, and a wonderful person. In an hour he fixed what we'd been racking our brains over for days! I'm sure this won't be the last time we rely on his boundless professionalism.

Ravenor · MikroTik hAP router setup. I'll configure a MikroTik Wi-Fi router for you.

2025-05-28 · ⭐ 5/5

An excellent specialist, a savvy expert, and a wonderful person. In an hour he fixed for us what we had been scratching our heads over for days! I'm sure this won't be the first time we make use of his boundless professionalism.

Need help?

Get in touch with me and I'll help solve the problem

Related Posts