Port 23: Telnet

Port 23 (TCP) is used by Telnet. Unencrypted remote terminal. Still found on old routers and IoT devices; replace with SSH.

23Port
TCPProtocol
telnetIANA service name
Remote accessCategory

Port range

23 is a well-known (system) port (range 0–1023). On Linux and macOS, binding to it traditionally needs root or the CAP_NET_BIND_SERVICE capability.

Security

Port 23 should not be reachable from the public internet. Restrict it to trusted networks or a VPN, and scan your public IP to confirm it is closed.

Open port 23 in a firewall

ufw         sudo ufw allow 23/tcp
iptables    sudo iptables -A INPUT -p tcp --dport 23 -j ACCEPT
firewalld   sudo firewall-cmd --permanent --add-port=23/tcp
Windows     New-NetFirewallRule -DisplayName "Telnet 23" -Direction Inbound -Protocol TCP -LocalPort 23 -Action Allow

Check if port 23 is open

nc -vz example.com 23
Test-NetConnection example.com -Port 23   # PowerShell
sudo ss -tulpn | grep ':23 '   # what is listening locally (Linux)

Other remote access ports

Frequently asked questions

What is port 23 used for?
Telnet. Unencrypted remote terminal. Still found on old routers and IoT devices; replace with SSH.
Is port 23 TCP or UDP?
TCP.