check a plaintext web server using telnet

WW2 Nose Art

introduction

This procedure uses the telnet command. Telnet is an application that can speak the telnet protocol, but when I use it to talk to a web server it sends raw data back and forth.

This procedure is only good for plaintext web browsers. If you want a procedure that removes some of the typing, check a plaintext web server using wget. If you want to test a secure web server (one that uses the SSL protocol) then check the web server using OpenSSL.

check from the web server host

If this test is successful, it proves that

  • the web server is running,
  • it is using the right IP address
  • the page can be given to clients (ie. it exists, it is in the right place and has the correct permissions).
  1. Open a CLI on the web server host.
  2. Find the right web server name. Try looking for the name in the hosts file.
    issalarg@ics01:>more /etc/hosts
    ...
    # webservers
    192.168.5.112  ics01-qfe0-v3        # www.dom01.com
    192.168.5.113  ics01-qfe1-v3        # www.dom02.com
    192.168.5.114  ics01-qfe2-v3        # www.dom03.com
    ...
    
  3. Use telnet to connect to the web server. This connection only stays open for a minute so don't go to the toilet before typing the next few commands. You can use the DNS name, but I tend to use the IP address.
    issalarg@ics01:>telnet 192.168.5.112 80
    Trying 192.168.5.112...
    Connected to 192.168.5.112.
    Escape character is '^]'.
    
    
  4. Request the test page. Every web server has one.
    GET /testpage.html HTTP/1.0
    
    HTTP/1.1 200 OK
    Server: Netscape-Enterprise/6.0
    Date: Wed, 17 Mar 2004 16:47:33 GMT
    Content-length: 52
    Content-type: text/html
    Last-modified: Sat, 01 Feb 2003 10:59:03 GMT
    Accept-ranges: bytes
    Connection: close
    
    www.dom02.com
    <br>
    Test page for IWE03
    <hr>
    Connection closed by foreign host.
    issalarg@ics01:>
    
  5. Close the CLI.