TCP · Port 23IANA Registered

Port 23 — Telnet

Legacy unencrypted terminal protocol developed in 1969 for remote command-line access.

⚡ Primary Use Cases & Environments

  • ✓Legacy router/switch debugging (historical)
  • ✓Raw TCP port reachability testing

🛡️ Security & Vulnerability Analysis

Telnet transmits all data including passwords in cleartext. It has been completely superseded by SSH (port 22) and must never be exposed on the public internet.

🔧 Network Diagnostics & Inspection

1. Check Active Listening Sockets (Local Host)
Terminal Command
$ sudo ss -tuln | grep :23
Inspects whether any local process daemon is bound to port 23.
2. Remote Port & Service Scan (Nmap)
Terminal Command
$ nmap -p 23 -sV <target-ip>
Probes target IP to determine whether port 23 is open, closed, or filtered.
3. Wireshark Capture / Display Filter
tcp.port == 23Wireshark Filter

🔥 Firewall Configuration Rules (UFW & iptables)

UFW (Uncomplicated Firewall)
Terminal Command
$ sudo ufw deny 23/tcp
Applies a persistent Linux UFW firewall rule for port 23.
iptables Command
Terminal Command
$ sudo iptables -A INPUT -p tcp --dport 23 -j DROP
Appends a direct netfilter kernel rule to the INPUT chain for port 23.

❓ Frequently Asked Questions (FAQ)

Is Telnet still used today?

Rarely for actual terminal login. However, administrators still use the telnet CLI client (e.g. "telnet host 80") as a quick diagnostic to test TCP socket connectivity.

How do I block port 23 completely?

Run "sudo ufw deny 23/tcp" or remove the telnet-server package (e.g. "sudo apt purge telnetd").

Related Networking Tools & Guides