What is port 23 used for?
Unencrypted remote terminal access, a predecessor of SSH.
Should port 23 be open?
Don’t expose to the internet. Keep this port on private networks and reach it through a VPN or SSH tunnel. Everything, including passwords, crosses the network in plain text. Telnet left open on routers and IoT devices is a classic botnet entry point. Use SSH.
See what is listening on port 23
# Linux
sudo ss -tlnp | grep ':23 '
# macOS
sudo lsof -nP -i TCP:23 -sTCP:LISTEN
# Windows (PowerShell)
Get-NetTCPConnection -LocalPort 23 -State Listen
Open or block port 23 in a firewall
# Ubuntu / Debian (ufw)
sudo ufw allow 23/tcp
sudo ufw deny 23/tcp
# Windows (PowerShell, as administrator)
New-NetFirewallRule -DisplayName "Port 23" -Direction Inbound -Protocol TCP -LocalPort 23 -Action Allow
On cloud servers, also open the port in the provider’s security group or network firewall. At home, a service behind a router needs a port-forwarding rule to the device’s local IP.
Test it from outside
A port can be open on the server but blocked upstream. The Port Checker connects from the internet, so it shows what the world sees. From your own machine, use nc -vz example.com 23 (macOS/Linux) or Test-NetConnection example.com -Port 23 (Windows).