Port 23 — Telnet (TCP)
What is Port 23?
Ukryptert tekstkommunikasjon
This is a well-known port (0–1023) commonly used by core services like Telnet. · RFC 854
When do you need Port 23 open?
Almost never open. Use SSH (port 22) for all remote access. Only open if connecting to legacy hardware (old routers or switches) that does not support SSH — and even then, only over a private, isolated network.
Common uses and software
- Legacy Cisco IOS devices
- Older network switches
- Industrial control systems (ICS)
- Embedded device management
Security
Telnet is critically insecure — credentials and all session data are transmitted in plain text with zero encryption. Replace Telnet with SSH (port 22) immediately on any system under your control. Block port 23 at your firewall. The only acceptable use is on fully isolated lab networks with no internet exposure.
Is Port 23 safe?
An open port increases your attack surface. Safety depends on how Telnet is configured.
This port is actively targeted by automated attacks. Keep it closed unless Telnet is actively required, and restrict access to known IP ranges in your firewall.
Test connectivity for Port 23 on any host.
How to Open Port 23
To allow incoming connections to Port 23 (Telnet) from outside your network, configure your firewall and add a port forwarding rule on your router pointing to your device's local IP address.
Open Windows Defender Firewall → Advanced Settings → Inbound Rules → New Rule → Port → TCP → Specific local ports: 23 → Allow the connection → Name and save the rule.
netsh advfirewall firewall add rule name="Open Port 23" dir=in action=allow protocol=tcp localport=23sudo ufw allow 23/tcpsudo iptables -A INPUT -p tcp --dport 23 -j ACCEPTLog into your router (192.168.1.1 or 192.168.0.1) → Port Forwarding → Add a new rule: Protocol TCP, External port 23, Internal IP: your device's local IP, Internal port 23 → Save.
How to close Port 23
If you do not need Telnet, block this port in your firewall or router.
To block port 23 on Windows, run the following command in PowerShell or Command Prompt (as Administrator):
netsh advfirewall firewall add rule name="Block Port 23" dir=in action=block protocol=tcp localport=23sudo ufw deny 23/tcpsudo iptables -A INPUT -p tcp --dport 23 -j DROPRemove or disable any port forwarding rule for Port 23.
Frequently Asked Questions
What is Port 23 used for?▾
Port 23 is the default TCP port for Telnet. It is used by servers and applications that need to accept incoming connections for this service. Whether you need it open depends on whether you are actively running a Telnet server — if not, it should remain closed to reduce your attack surface.
Is Port 23 safe to keep open?▾
An open Port 23 increases your attack surface. If you are not actively running Telnet, close this port in your firewall and remove any port forwarding rules. If Telnet must be accessible, restrict access to known IP ranges, keep the service software updated with security patches, and use strong authentication.