AllGoodBits.org

Testing network services from the command line

The best way to experiment, is to attempt to eliminate as many variables as possible, other than that which you intend to examine. So it is with network services. If we want to remove all the vagaries introduced by poor protocol implementation by clients (user agents) or network oddities, etc., then we are left the with the most simple test of he service in question.

"Connect as directly as possible using the simplest possible client"

The simplest way to test method most network services is sending text directly to the port on the server via telnet. If your server only permits TLS or OpenSSL encrypted communication, as one might argue it should, then the simplest is to use OpenSSL's s_client. This is true for SMTP, IMAP and HTTP services.

Here I am addressing manual testing for troubleshooting purposes, not
automated testing, such as smoke tests, regression testing, continuous
intergration, and the like.