HTTP Protocol Basics
HTTP is a plaintext protocol. Thereby, simulating a browser and testing access through port 80 using the telnet command becomes simple.
The following steps are necessary for this from a Linux command line:
telnet SERVERNAME 80. Thereby, telnet will connect to the server named SERVERNAME through port 80.
- If the establishment of the TCP connection is possible, telnet will respond with the messages:
Connected to SERVERNAME.and
Escape character is '^]'.
- A web page can now be requested using the HTTP protocol (such as the server’s web site). Enter the following two lines to do this and press afterwards the Enter key two times:
GET / HTTP/1.1
- The server will respond with the HTTP status and the web page (such as
HTTP/1.1 200 OKand so forth.)
telnet checkip.dyndns.org 80
GET / HTTP/1.1
The checkip.dyndns.org server will respond with HTTP Response, which will also contain the HTML code for the web page:
[user@fedora9 user]$ telnet checkip.dyndns.org 80 Trying 18.104.22.168... Connected to checkip.dyndns.org. Escape character is '^]'. GET / HTTP/1.1 HOST: checkip.dyndns.org HTTP/1.1 200 OK Content-Type: text/html Server: DynDNS-CheckIP/1.0 Connection: close Cache-Control: no-cache Pragma: no-cache Content-Length: 106 <html><head><title>Current IP Check</title></head><body>Current IP Address: 22.214.171.124</body></html> Connection closed by foreign host. [user@fedora9 user]$
- Hypertext Transfer Protocol (en.wikipedia.org)
- For details, see http://www.dyndns.com/support/tools/