Skip to content

Telnet server fails to accept connections on Windows with loopback network interception #3171

@Moriarteh

Description

@Moriarteh

Description

On some Windows systems, the kOS telnet server listens successfully but clients can never connect. The connection hangs indefinitely at "Trying 127.0.0.1..." with no error or rejection.

Root Cause

When TcpListener binds specifically to IPAddress.Loopback (127.0.0.1), third-party software that hooks the Windows loopback network interface can intercept the traffic before it reaches the application. The most common culprit is Npcap (bundled with Wireshark and Nmap), which installs its own "Npcap Loopback Adapter", but firewalls and other network drivers can cause the same issue.

Steps to Reproduce

  1. Have any software installed that hooks the loopback interface (e.g. Wireshark/Npcap)
  2. Enable the kOS telnet server in loopback mode
  3. Attempt to connect via telnet to 127.0.0.1 on the configured port
  4. Connection hangs indefinitely

Expected Behavior

Telnet client connects to the kOS terminal server.

Environment

  • Windows 10/11
  • KSP 1.12.x
  • kOS 1.5.1.0

Related

Likely the same root cause as #2937 which was closed as a firewall issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions