Port 23: Telnet (Telnet remote terminal)
What port 23 (TCP) does, the security risks of leaving it open, and how to secure and test it.
| Port | 23 |
|---|---|
| Transport | TCP |
| Service | Telnet remote terminal (Telnet) |
| Encrypted | No |
What is port 23?
Telnet is the old way to get a remote command line on servers and network devices. It sends everything, including passwords, in plain text.
Common uses
- Legacy management of old switches and routers
- Quick tests to see if a TCP port is open (telnet host port)
Security risks
- Passwords and commands can be captured by anyone on the network
- Exposed Telnet on IoT devices is a common target for botnets such as Mirai
How to secure port 23
- Disable Telnet and use SSH (port 22) instead
- On Cisco devices: line vty 0 15, then transport input ssh
- Block TCP 23 at the internet edge
How to check if port 23 is open
| Where | Command |
|---|---|
| Scan from another machine | nmap -p 23 <host> |
| Windows (PowerShell) | Test-NetConnection <host> -Port 23 |
| Linux (what is listening) | sudo ss -tulpn | grep :23 |
| Windows (what is listening) | netstat -ano | findstr :23 |
Only scan systems you own or have permission to test.
Example: block it at the internet edge (Cisco)
For a service that should stay inside your network, deny it on the internet-facing interface. Put the rule before any broader permit statements:
ip access-list extended INTERNET-IN
remark Block Telnet from the internet
deny tcp any any eq 23
permit ip any any
!
interface GigabitEthernet0/0
ip access-group INTERNET-IN inIn a real network the final line would be your normal inbound policy, not "permit ip any any". Build and check rules with the ACL builder.
Related ports
Frequently asked questions
What is port 23 used for?
Port 23 (TCP) is used by Telnet remote terminal (Telnet). Telnet is the old way to get a remote command line on servers and network devices.
Is it safe to open port 23?
Only if the service needs to be reached and is configured securely. Disable Telnet and use SSH (port 22) instead.
How do I check if port 23 is open?
From another computer, run nmap -p 23 followed by the host address. On the server itself, ss -tulpn on Linux or netstat -ano on Windows shows whether anything is listening on 23.
Learn more: TCP, UDP and ports explained and firewall basics.