New Perspectives On Web Design

(C. Jardin) #1
By Paul Tero CHAPTER 8

TelneT anD neTCaT


The telnet command allows you to mimic a container ship and connect
to a specific port on a server. Windows does not have telnet by default,
but you can enable it on Windows 7 by going to Start → Control Panel →
Programs → Turn Windows features on or off → Telnet Client.
Since we’re dealing with a website problem, and since the Web server
is almost always on port 80, try telnetting to port 80:


$ telnet http://www.smashingmagazine.com 80
Trying 80.72.139.101...
telnet: Unable to connect to remote host: Connection refused


Mac and Linux support an alternative command: netcat. It is more
specifically suited for networking tasks and supports additional features
like proxies. This chapter will focus on telnet, however, as it also works on
Windows. Add -v to netcat to make it verbosely tell you what it’s doing.


$ netcat -v http://www.smashingmagazine.com 80
netcat: connect to http://www.smashingmagazine.com port 80 (tcp) failed: Connec-
tion refused


Uh oh.
Except, not really. I faked the issue above. Smashing Magazine wasn’t
really down. But I will use http://www.smashingmagazine.com as an example
domain throughout this chapter. Suspend your disbelief and pretend that
Smashing has moved into the Widget 3000 market and has sequentially
fallen victim to just about every networking and website problem
imaginable, and subsequently overcome them.


ConTRol Panel
Whenever your Web server receives data on port 80, it sends it to a piece
of software for processing. Confusingly, that software is also called a Web
server. By far the most common type of Web server software is Apache.

Free download pdf