HTTPfy

Port 23 (Telnet)

Unencrypted remote terminal. Still found on old network gear, embedded devices and lab equipment.

Well-known (system) port, 0-1023 TCP Remote access Do not expose to the internet

What port 23 is used for

Unencrypted remote terminal. Still found on old network gear, embedded devices and lab equipment.

Security: should port 23 be open?

Do not expose to the internet. Do not expose Telnet. Everything, including passwords, is sent in clear text, and IoT botnets such as Mirai spread by logging into Telnet with default credentials. Replace it with SSH.

IANA assignment

Service nameProtoDescriptionAssigneeReference
telnet TCP Telnet
Defined TXT keys: u=<username> p=<password>
Jon Postel RFC 854
telnet UDP Telnet
Defined TXT keys: u=<username> p=<password>
Jon Postel RFC 854

Check what is listening on port 23

Linux: is anything listening on TCP 23?
sudo ss -tlnp 'sport = :23'
Linux / macOS: which process owns the port
sudo lsof -nP -i :23
Older Linux / BSD (net-tools)
sudo netstat -tlnp | grep ':23 '
Windows (Command Prompt)
netstat -ano | findstr :23
Windows (PowerShell)
Get-NetTCPConnection -LocalPort 23 -State Listen | Select LocalAddress,OwningProcess

Test it from outside

From another machine
nc -vz -w 5 HOST 23
From Windows
Test-NetConnection HOST -Port 23

Block port 23 in the firewall

ufw
sudo ufw deny 23/tcp
iptables
sudo iptables -A INPUT -p tcp --dport 23 -j DROP
nftables
sudo nft add rule inet filter input tcp dport 23 drop
Windows Firewall
New-NetFirewallRule -DisplayName 'Block TCP 23' -Direction Inbound -Protocol TCP -LocalPort 23 -Action Block

Related ports

All port numbers · Open port checker
Assignment data: IANA port number registry (public domain), retrieved 2026-11-10.