Port 23 is the default transmission control protocol (TCP) port for Telnet, a legacy network protocol designed to provide a command-line interface for communication with a remote device or server. In the foundational era of the internet, Port 23 was the primary method for researchers and system administrators to log into mainframes and Unix systems from remote locations. However, in the contemporary cybersecurity landscape, this port is widely regarded as a critical vulnerability due to its inherent lack of encryption.

What Is the Primary Purpose of Port 23?

The fundamental role of Port 23 is to facilitate the Telnet protocol, which stands for "Teletype Network." It operates on the client-server model. When a user initiates a Telnet session, the client software on their local machine establishes a TCP connection to Port 23 on the destination host. Once the connection is active, the remote host presents a login prompt, allowing the user to enter credentials and execute commands as if they were physically present at the machine's console.

During the late 20th century, Port 23 was indispensable. It allowed network engineers to configure routers, manage switches, and interact with early database systems across vast distances. Because it operates at the Application Layer of the OSI model, Telnet provides a direct window into a system’s internal operations, making it a powerful—albeit risky—tool for remote administration.

The Historical Significance of the First Arpanet Connection

To understand why Port 23 exists, one must look back to October 29, 1969. At a laboratory at UCLA, student Charley Kline attempted to send the first message to a computer at the Stanford Research Institute. The goal was to "login." The system crashed after the first two letters, making "LO" the first transmission ever sent across the ARPANET, the precursor to the modern internet.

This experiment eventually evolved into the formalized Telnet protocol. By the time RFC 854 was published in 1983, Telnet had become a standardized method for interoperability between different types of computer hardware. The concept of the Network Virtual Terminal (NVT) was introduced, allowing a DEC terminal to communicate with an IBM mainframe by translating local character sets into a universal format. Port 23 was the designated gatekeeper for this revolutionary connectivity.

How Does Port 23 Manage Data Transmission?

Technically, Port 23 uses a bidirectional 8-bit oriented communications facility. A key feature of the protocol is the use of "options," which allow the client and server to negotiate the terms of their interaction. For instance, they might agree on terminal type, window size, or whether to echo characters locally.

This negotiation happens via specific byte sequences. When a command is sent, it is preceded by an "Interpret as Command" (IAC) byte (decimal 255). This allows the protocol to distinguish between the actual data being sent (like a username) and the control signals used to manage the session. While elegant in its simplicity, this architecture assumes that every node on the network is trustworthy—a premise that proved catastrophic as the internet expanded.

Why Is Port 23 Considered a Major Security Risk?

The most significant flaw of Port 23 is that it transmits all data in plaintext. In a standard Telnet session, usernames, passwords, and every command typed by the user travel across the network in an unencrypted format.

In a modern environment, an attacker positioned anywhere on the network path—whether through a compromised router, a public Wi-Fi hotspot, or a malicious ISP—can use a basic packet sniffer like Wireshark to intercept this traffic. The credentials are visible to the naked eye. This makes Port 23 a primary target for Man-in-the-Middle (MITM) attacks. Furthermore, Telnet lacks a robust mechanism for verifying the identity of the server, meaning a user could unknowingly connect to a fraudulent machine designed to harvest their login information.

The Legacy of the Mirai Botnet and Port 23

The danger of Port 23 is not merely theoretical; it has been the catalyst for some of the largest cyberattacks in history. The most notorious example is the Mirai botnet of 2016. Mirai targeted the "Internet of Things" (IoT)—devices like IP cameras, digital video recorders, and home routers. Many of these devices were shipped with Port 23 open by default and utilized factory-preset credentials like "admin" or "12345."

Mirai scanned the internet for Port 23, attempted to log in using a list of 62 common default passwords, and once successful, turned the device into a "zombie" node. At its peak, this botnet consisted of hundreds of thousands of devices. It was used to launch a Distributed Denial of Service (DDoS) attack against Dyn, a major DNS provider, which resulted in widespread outages for platforms including Twitter, Reddit, and Netflix. This event served as a wake-up call for the industry, highlighting that an open Port 23 is not just a risk to the individual device, but to the stability of the global internet.

Is Port 23 Still Used in Modern Systems?

Despite the risks, Port 23 has not disappeared. It remains active in several specific niches:

  1. Legacy Industrial Hardware: Many Programmable Logic Controllers (PLCs) and industrial sensors manufactured decades ago were built with Telnet as their only remote management option. Replacing these systems in a factory or power plant is often prohibitively expensive.
  2. Network Diagnostics: System administrators sometimes use a Telnet client to "ping" other ports. For example, running telnet example.com 80 is a quick way to see if a web server is responding to connections, even if the Telnet protocol itself isn't being used.
  3. MUDs and BBSs: A vibrant community of retro-computing enthusiasts still uses Port 23 to access Multi-User Dungeons (text-based RPGs) and Bulletin Board Systems. These systems are typically run on isolated servers where security is less of a concern than historical preservation.
  4. Specialized Laboratory Equipment: Certain scientific instruments and medical devices continue to use Telnet for data output because the protocol is lightweight and easy to implement in embedded systems with limited processing power.

How to Check if Port 23 Is Open on Your Network

For security-conscious users, verifying that Port 23 is closed is a standard procedure. Depending on the operating system, several tools can be used to scan for this port.

Using Nmap on Linux or macOS

Nmap is the industry standard for network exploration. To check a specific IP address for an open Port 23, one would use the following command: nmap -p 23 [Target IP Address] If the result shows the port as "open," the device is actively listening for Telnet connections and should be secured immediately.

Using Netstat on Windows

To see if your own Windows machine is listening on Port 23, open the Command Prompt as an administrator and run: netstat -an | findstr :23 If no output is returned, the port is not listening. If a line appears showing "LISTENING," the Telnet server feature may be enabled.

Using PowerShell for Remote Checks

PowerShell offers a modern way to test connectivity to Port 23: Test-NetConnection -ComputerName [Target IP] -Port 23 This command provides a clear "TcpTestSucceeded" result (True or False), making it easy for administrators to script large-scale network audits.

Moving from Port 23 to Port 22 (SSH)

The industry-wide solution to the Telnet problem is Secure Shell (SSH), which operates on Port 22. SSH provides the same command-line remote access as Telnet but adds layers of strong encryption and public-key authentication.

When a session is established on Port 22, the client and server perform a secure handshake to agree on encryption keys. Every subsequent byte—including the login process—is encrypted. Even if an attacker intercepts the packets, they will see only garbled data that is computationally impossible to decrypt without the proper keys. For any system that requires remote management, disabling Port 23 and enabling Port 22 is the single most effective step a technician can take to harden the system.

How to Disable or Block Port 23

If you discover that Port 23 is open and you do not require it for legacy support, it should be disabled at both the service level and the firewall level.

Disabling the Telnet Service on Windows

In modern versions of Windows, the Telnet Server is an optional feature. To remove it:

  1. Open the Control Panel and go to "Programs and Features."
  2. Click "Turn Windows features on or off."
  3. Uncheck "Telnet Server" and "Telnet Client."
  4. Click OK and restart if prompted.

Blocking Port 23 via Firewall (Linux/ufw)

On many Linux distributions, the Uncomplicated Firewall (ufw) makes blocking Port 23 simple: sudo ufw deny 23/tcp This command ensures that any incoming packets destined for Port 23 are dropped before they reach the application layer.

Blocking Port 23 on Routers

For home and small business users, the most important defense is at the router level. Ensure that "Port Forwarding" is not configured to send external traffic to Port 23 on any internal device. Most modern routers also have a "Stealth Mode" or "Block WAN Requests" setting that will ignore all unsolicited traffic to common ports like 23.

Common Troubleshooting and Issues with Port 23

Users who must use Port 23 for legitimate reasons often encounter specific hurdles. One common issue is the "Connection Refused" error. This usually indicates that the Telnet server service is not running on the target machine, or that a local firewall is blocking the connection.

Another frequent problem is the "Connection Timed Out" message. This often happens because Internet Service Providers (ISPs) proactively block Port 23 traffic to prevent their customers from being recruited into botnets. If you are trying to access a legacy device at a remote office, you may need to set up a Virtual Private Network (VPN) first, then connect to Port 23 through the secure tunnel, bypassing the ISP’s filters.

Summary of Port 23 Characteristics

Feature Port 23 (Telnet)
Protocol Type TCP (Transmission Control Protocol)
Security Status Insecure (Plaintext)
Standard Alternative Port 22 (SSH)
Primary Use Case Remote command-line access
Current Status Legacy / Obsolete
Risk Factor High (Credential Sniffing, Botnets)

Conclusion

Port 23 is a relic of a more trusting era in computing. While it played a pivotal role in the birth of the internet and remains a useful tool for troubleshooting and managing legacy industrial systems, its lack of encryption makes it a liability in the modern age. The rise of the Mirai botnet demonstrated that even seemingly insignificant IoT devices can become weapons when their Telnet ports are left exposed. For the vast majority of users and administrators, Port 23 should be kept closed, with all remote management traffic redirected to the secure embrace of Port 22.

FAQ

What does Port 23 do? Port 23 is the default port for the Telnet protocol, used to provide a text-based, remote command-line interface between a client and a server. It allows users to control a computer from a distance.

Why is Port 23 a security risk? Port 23 does not encrypt its data. All information, including usernames and passwords, is sent as plaintext. This allows anyone on the same network to intercept and read sensitive credentials using packet-sniffing tools.

Should Port 23 be open or closed? In almost all cases, Port 23 should be closed. Unless you are specifically managing very old legacy hardware that does not support modern protocols, keeping Port 23 open exposes you to significant hacking risks.

What is the difference between Port 22 and Port 23? Port 23 is for Telnet, which is unencrypted and insecure. Port 22 is for SSH (Secure Shell), which provides the same remote access functionality but uses strong encryption to protect data and credentials.

Can I use Telnet to test other ports? Yes. A Telnet client can be used to check if other ports (like 80 for HTTP or 443 for HTTPS) are open by attempting to connect to them. This is a common diagnostic technique for network administrators.

How do I enable the Telnet client in Windows? The Telnet client is disabled by default in Windows 10 and 11. You can enable it through the "Turn Windows features on or off" menu in the Control Panel or by running the command dism /online /Enable-Feature /FeatureName:TelnetClient in an elevated Command Prompt.