Tải bản đầy đủ
[Chapter 12] 12.9 Summary

[Chapter 12] 12.9 Summary

Tải bản đầy đủ

[Chapter 13] Internet Information Resources

Previous: 12.9 Summary

Chapter 13

Next: 13.2 Anonymous FTP

13. Internet Information Resources
Contents:
The World Wide Web
Anonymous FTP
Finding Files
Retrieving RFCs
Mailing Lists
The White Pages
Summary
Now that our network is configured, debugged, and secure, how will we use it? Increasingly, a
network serves not merely as a delivery link between two hosts, but as a path to information
resources. Information servers, file repositories, databases, and information directories are available
throughout the Internet. But, with millions of devices connected to the Internet, finding these services
can be a daunting task.
This chapter explores various ways to avail yourself of this storehouse of information. We look at
how information is retrieved from network servers, some tools that make it easier to locate that
information, and how to configure your system as an anonymous FTP server.

13.1 The World Wide Web
The primary method used to retrieve network information is the World Wide Web. The Web is an
interlinked network of hypertext servers based on the Hypertext Transfer Protocol (HTTP) that runs
on top of TCP/IP. The Web is accessed via a browser, a program that provides a consistent graphical
interface to the user. All of the popular UNIX browsers - Netscape, Mosaic, Arena, etc. - are modeled
after the original Mosaic browser developed at the National Center for Supercomputer Applications
(NCSA). Therefore, they share a common look and feel.
Most UNIX systems do not ship with a built-in browser; you need to download one from the Internet.
The Netscape browser is available at the URL http://www.netscape.com. It can be downloaded,
evaluated, and then purchased. (It's nice to be able to try before you buy!) The Mosaic browser is
available free of charge at ftp://ftp.ncsa.edu/Web/Mosaic/Unix/binaries. They both work well and in
file:///C|/mynapster/Downloads/warez/tcpip/ch13_01.htm (1 of 6) [2001-10-15 09:19:02]

[Chapter 13] Internet Information Resources

an almost identical manner. However, Netscape is the most popular browser and has an active
development team.
Obtaining information from hypertext Web pages is the most common use for a browser. Use yours to
keep up with the most current network information. Figure 13.1 shows a network administrator
checking the security alerts at the Computer Security Resource Clearinghouse at the National Institute
of Standards and Technology.
Figure 13.1: Security alerts website

The URL field near the top of the sample screen is the location of the Web page we are reading. On
file:///C|/mynapster/Downloads/warez/tcpip/ch13_01.htm (2 of 6) [2001-10-15 09:19:02]

[Chapter 13] Internet Information Resources

some other browsers this field is labeled "Location" or "Netsite," but in all cases it performs the same
function: it holds the path to the information resource. In the example the location is
http://csrc.nist.gov/secalert/. "URL" stands for universal resource locator. It is a standard way of
defining a network resource and it has a specific structure:
service://server/path/file
In the sample URL, http is the service; csrc.nist.gov is the server; and secalerts is the path to the
resource contained on that server. This tells the browser to locate a host with the domain name
csrc.nist.gov, and to ask it for the hypertext information located in the secalerts path. Hypertext is not
the only type of information that can be retrieved by a browser. The browser is intended to provide a
consistent interface to various types of network resources. HTTP is only one of the services that can
be specified in a URL.
A Web browser can be used to view local hypertext files. This is how the gated documentation is
delivered. Figure 13.2 shows a network administrator reading the gated documentation. The URL in
Figure 13.2 is file://localhost/usr/doc/config_guide/config.html. The service is file, which means that
the resource is to be read via the standard filesystem. The server is the local host (localhost). The path
is /usr/doc/config_gated, and the file is config.html.
Figure 13.2: Reading GateD documentation

file:///C|/mynapster/Downloads/warez/tcpip/ch13_01.htm (3 of 6) [2001-10-15 09:19:02]

[Chapter 13] Internet Information Resources

Another browser service that is often used by a network administrator is FTP. Figure 13.3 shows a
network administrator using a browser to download software. The URL in Figure 13.3 is
ftp://ftp.ncsa.edu/Web/Mosaic/Unix/binaries/2.6. FTP is the service used to access the resource,
which in this case is a binary file. The server is ftp.ncsa.edu, which is the anonymous FTP server at
the National Center for Super Computing Applications. The path is /Web/Mosaic/Unix/binaries/2.6
and the file is any of the files listed on the screen.
Figure 13.3: Browser FTP interface

file:///C|/mynapster/Downloads/warez/tcpip/ch13_01.htm (4 of 6) [2001-10-15 09:19:02]

[Chapter 13] Internet Information Resources

Reading important announcements and documentation and downloading files are probably the most
common uses a network administrator has for a Web browser. There are, however, many other things
that can be done with a browser and a huge number of resources available on the network. A detailed
discussion of browsers and the Web is beyond the scope of this book. See The Whole Internet User's
Guide and Catalog, by Ed Krol (O'Reilly & Associates), for a full treatment of these subjects.
The browser provides a consistent interface to a variety of network services. But it is not the only
way, or necessarily the best way, to access all of these services. In particular, it may not be the fastest
or most efficient way to download a file. Figure 13.3 shows a file being downloaded from an
anonymous FTP server. An alternative is to invoke ftp directly from the command-line interface.

file:///C|/mynapster/Downloads/warez/tcpip/ch13_01.htm (5 of 6) [2001-10-15 09:19:02]

[Chapter 13] Internet Information Resources

Previous: 12.9 Summary
12.9 Summary

TCP/IP Network
Administration
Book Index

Next: 13.2 Anonymous FTP
13.2 Anonymous FTP

[ Library Home | DNS & BIND | TCP/IP | sendmail | sendmail Reference | Firewalls | Practical Security ]

file:///C|/mynapster/Downloads/warez/tcpip/ch13_01.htm (6 of 6) [2001-10-15 09:19:02]

[Chapter 13] 13.2 Anonymous FTP

Previous: 13.1 The World
Wide Web

Chapter 13
Internet Information
Resources

Next: 13.3 Finding Files

13.2 Anonymous FTP
Anonymous FTP is mentioned throughout this book as a technique for retrieving publicly available
files and programs from the many FTP servers around the Internet. Anonymous FTP is simply an ftp
session in which you log into the remote server using the username anonymous and, by convention,
your email address as the password. [1] The anonymous FTP example below should make this simple
process clear:
[1] Some FTP servers request your real username as a password.
% ftp ftp.ncsa.edu
Connected to ftp.ncsa.uiuc.edu.
220 FTP server Wed May 21 1997 ready.
Name (ftp.ncsa.edu:kathy): anonymous
331 Guest login ok, use email address as password.
Password:
ftp> cd /Web/Mosaic/Unix/binaries/2.6
250 CWD command successful.
ftp> binary
200 Type set to I.
ftp> get Mosaic-hp-2.6.Z Mosaic.Z
200 PORT command successful.
150 Opening BINARY mode data connection for Mosaic-hp-2.6.Z.
226 Transfer complete.
local: Mosaic.Z remote: Mosaic-hp-2.6.Z
809343 bytes received in 3.5 seconds (2.3e+02 Kbytes/s)
ftp> quit
221 Goodbye.
In this example, the user logs into the server ftp.ncsa.edu using the username anonymous and the
password kathy@nuts.com, which is her email address. With anonymous FTP, she can log in even
though she doesn't have an account on ftp.ncsa.edu. Of course what she can do is restricted, but she
can retrieve certain files from the system, and that's just what she does. She changes to the
/Web/Mosaic/Unix/binaries/2.6 directory and gets the compressed file Mosaic-hp-2.6.Z. The file is
retrieved in binary mode.
file:///C|/mynapster/Downloads/warez/tcpip/ch13_02.htm (1 of 4) [2001-10-15 09:19:03]

[Chapter 13] 13.2 Anonymous FTP

13.2.1 Creating an FTP Server
Using the anonymous FTP service offered by a remote server is very simple. However, setting up an
anonymous FTP service on your own system is a little more complicated. Here are the steps to set up
an anonymous FTP server:
1. Add user ftp to the /etc/passwd file.
2. Create an ftp home directory owned by user ftp that cannot be written to by anyone.
3. Create a bin directory under the ftp home directory that is owned by root, and that cannot be
written to by anyone. The ls program should be placed in this directory and changed to mode
111 (execute-only).
4. Create an etc directory in the ftp home directory that is owned by root, and that cannot be
written to by anyone. Create special passwd and group files in this directory, and change the
mode of both files to 444 (read-only).
5. Create a pub directory in the ftp home directory that is owned by root and is only writable by
root, i.e., mode 644. Don't allow remote users to store files on your server, unless it is
absolutely necessary and your system is on a private, non-connected network. If you must
allow users to store files on the server, change the ownership of this directory to ftp and the
mode to 666 (read and write). This should be the only directory where anonymous FTP users
can store files.
The following examples show each of these steps. First, create the ftp home directory and the required
subdirectories. In our example, we create the ftp directory under the /usr directory.
#
#
#
#
#

mkdir /usr/ftp
cd /usr/ftp
mkdir bin
mkdir etc
mkdir pub

Then copy ls to /usr/ftp/bin, and set the correct permissions.
# cp /bin/ls /usr/ftp/bin
# chmod 111 /usr/ftp/bin/ls
Create a group that will be used only by anonymous FTP, a group that has no other members. In our
example we create a group called anonymous. An entry for this new group is added to the /etc/group
file, and a file named /usr/ftp/etc/group is created that contains only this single entry.
anonymous:*:15:
Create a user named ftp by placing an entry for that user in the file /etc/passwd. Also create a file
named /usr/ftp/etc/passwd that contains only the ftp entry. Here's the entry we used in both files:

file:///C|/mynapster/Downloads/warez/tcpip/ch13_02.htm (2 of 4) [2001-10-15 09:19:03]