tcpbin.com - A TCP echo server with (optional) TLS and mTLS

tcpbin.com is a TCP echo server service developed for demo and integration test purposes.
The examples below are for shell based access but you can achieve the same from programming language of your choice.

Features

If you prefer to skip DNS lookup of tcpbin.com, you can use the following static IP addresses

How to use?

You can find some examples based on popular command line tools:

TCP echo


$ nc tcpbin.com 4242
Hello server!
Hello server!
      

TCP echo with TLS encryption


$ openssl s_client -crlf -connect tcpbin.com:4243 -quiet
depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
verify return:1
depth=0 CN = tcpbin.com
verify return:1
An encrypted hello!
An encrypted hello!
      

TCP echo with mutual authentication

Please see below on how to get your certificate and private key.

$ openssl s_client -connect tcpbin.com:4244 -cert client_cert -key client_key -quiet
depth=2 O = Digital Signature Trust Co., CN = DST Root CA X3
verify return:1
depth=1 C = US, O = Let's Encrypt, CN = Let's Encrypt Authority X3
verify return:1
depth=0 CN = tcpbin.com
verify return:1
An encrypted and authenticated hello!
An encrypted and authenticated hello!
      

Getting client certificate and key for mTLS

To authenticate on port 4244, you will need a valid client certificate and key. Please note that the CA used for this purpose is an open CA, meaning it should not be trusted for anything other than this service. There are two ways to generate the client certificate: