I'm having unexpected behavior using the telnet command on various linux (Linux Mint, Ubuntu server).

When trying to connect to a non-existent device, it succeed. I tested with which is not a placeholder.


$ telnet 9100
Connected to
Escape character is '^]'.
telnet> Connection closed.


fails as expected, this is not the problem!

$ ping -c 5
PING ( 56(84) bytes of data.

--- ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4076ms

Traceroute (update)

$ sudo traceroute -T -p telnet
traceroute to (, 30 hops max, 60 byte packets
 1 (  2.693 ms  3.166 ms  3.178 ms


$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    600    0        0 wlp4s0     U     1000   0        0 br-427309471a28     U     0      0        0 docker0     U     0      0        0 br-427309471a28   U     600    0        0 wlp4s0

Even when stopping docker I still can reproduce:

$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    600    0        0 wlp4s0   U     600    0        0 wlp4s0


Here is a recording.

Why is telnet connecting on a device that doesn't exist?

  • 2
    Please traceroute to the address to try and see if there is a nearby middlebox i.e. a firewall doing something horribly confusing. Something like traceroute -T -p telnet, i.e. using the same TCP port as telnet does. (You can also try the mtr version of traceroute, it may return results faster). – sourcejedi Mar 15 '17 at 12:43
  • Seems like icmp packets are being dropped. By a firewall rule – Katz Mar 15 '17 at 17:48
  • @sourcejedi updated to add traceroute output + recording: asciinema.org/a/e16ndw5jm81yyzfswrieofu83 – Édouard Lopez Mar 15 '17 at 18:31
  • This indicates the behaviour is coming from your local network. Please post route -n as requested, to confirm that your computers are using the default route to reach If so, hop 1 should represent an IP address which is handled directly on the router. Are the machines you tested on all connected to the same router? What model is the router? – sourcejedi Mar 16 '17 at 7:59
  • 1
    Sounds very much like a transparent proxy on your network. – Stéphane Chazelas Mar 16 '17 at 10:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.