Telnet port 80

Allows all output to be seen for easier troubleshooting.

[[email protected] ~]$ telnet 80
Connected to
Escape character is '^]'.
HTTP/1.0 302 Found
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Set-Cookie: PREF=ID=aca7ce20b11489b5:TM=1273490037:LM=1273490037:S=efOcyW5HLidr1H2B; expires=Wed, 09-May-2012 11:13:57 GMT; path=/;
Date: Mon, 10 May 2010 11:13:57 GMT
Server: gws
Content-Length: 221
X-XSS-Protection: 1; mode=block

<HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
<H1>302 Moved</H1>
The document has moved
<A HREF="">here</A>.
Connection closed by foreign host.

See Also

OpenSSL s_client for telnet-like troubleshooting for SSL connections

Ensure that openssl is installed.

openssl s_client -connect hostname:port

Normal GET and HEAD etc. statements can now be typed in as if it was a normal HTTP session.

View packets in tcpdump

If networking needs to be eliminated from troubleshooting.
Run this on a client:

sudo tcpdump -s 0 -A 'tcp dst port 80'

And/or the following on a server:

sudo tcpdump -s 0 -A 'tcp host client.ip.address'

This will show the full ASCII packet. Obviously this will not work for SSL connections.

Category:Linux Category:Web