Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Linux+ Certification Bible.pdf
Скачиваний:
46
Добавлен:
15.03.2015
Размер:
3.78 Mб
Скачать

240 Part III Configuration

Configuring Internet Services

3.6 Configure basic Internet services (e.g., HTTP, POP, SMTP, SNMP, FTP)

3.15 Configure access rights (e.g., rlogin NIS, FTP, TFTP, SSH, Telnet)

The configuration of Internet services is a very broad topic. Client services are usually thought of as World Wide Web, e-mail, news, and FTP clients. Configuring these services requires the knowledge of which service is being provided.

Web browser

A Web browser is used to view Web pages that use the Hypertext Markup Language (HTML) over the Hypertext Transfer Protocol (HTTP). Configuring a third party Web browser or an included browser, such as the KDE Konqueror Web browser, requires very little effort. Usually, these programs use the settings created in the configuration of networking. After a system has been assigned an IP address, netmask, default path (gateway) and DNS, the Web browser uses those settings to access the intranet or Internet. However, in some environments, these settings may not be enough. For example, if a proxy server is being used to manage Internet access for users, you must configure an additional setting to indicate the address of the proxy server.

POP and SMTP

POP3 and SMTP are used in conjunction to provide a client with the ability to send and receive e-mail. The POP3, or Post Office Protocol 3, is the most recent version of a standard protocol for receiving e-mail downloaded to clients from servers. The POP3 system holds the e-mail until the client connects; after the client connects, the mail is downloaded to the client’s system. The Simple Mail Transfer Protocol (SMTP) is used for sending and receiving e-mail. Because it is limited in its ability to queue messages, however, SMTP is normally used for server-to-server mail transfer and uploading of messages from clients.

The IMAP standard is an alternative to POP3. It allows the client to access e-mail from the mail server without removing it from the server until instructed to do so by the client.

The basic configuration of POP3 and SMTP clients requires some information. You need to insert the following information into the mail client.

User Name

E-mail account name

POP3 server name (used for incoming mail)

Chapter 7 Configuring Networking 241

POP3 TCP/IP port used; the default is 110 and is usually used but can be changed

SMTP server name (used for outgoing mail)

SMTP TCP/IP port used, the default is 25 and is usually used but can be changed

Authentication method used

Using these settings with any mail client software should allow the configuration of mail accounts. Another feature also included with many mail clients is the ability to access News servers. These can be configured inside the mail client and require the following additional information.

Server name

NNTP TCP/IP port used, the default settings are 119 for standard connections and 563 for SSL connections (usually used but can be changed)

User name and password preferences

This enables the configuration of POP3, SMTP, and NNTP for clients in most environments.

FTP

The standard for distributing files on the Internet is the File Transfer Protocol (FTP). It is the simplest way to exchange files between computers on the Internet. With a simple command line interface, a user can use FTP to perform updates, deletes, renames, moves, and copies of files at a server. Web browsers make FTP requests to download files that are selected from a Web page. To use FTP, a user can use the switches and commands shown in Table 7-4.

Table 7-4

FTP Client Switches and Commands

Switch/Command

Description

 

 

-d

Enable debugging.

 

 

-g

Disable filename “globbing.”

 

 

-i

Turn off interactive prompting during multiple file transfers.

 

 

-n

Do not attempt “auto-login” upon initial connection.

 

 

-t

Enable packet tracing (not used).

 

 

Continued

242 Part III Configuration

 

Table 7-4 (continued)

 

 

Switch/Command

Description

 

 

-v

Show all responses from the remote server, as well as report on

 

data transfer statistics. This is turned on by default if ftp is

 

running interactively with its input coming from the user’s

 

terminal.

 

 

! [ command ]

Run command as a shell command on the local machine. If no

 

command is given, invoke an interactive shell.

 

 

$ macro-name [ args ]

Execute the macro-name that was defined with the macdef

 

command.

 

 

account [ passwd ]

Supply a supplemental password required by a remote system

 

for access to resources once a login has been successfully

 

completed.

 

 

append

Append a local file to a file on the remote machine.

 

 

ascii

Use ASCII, the default.

 

 

bell

Sound a bell after each file transfer command is completed.

 

 

binary

Use binary.

 

 

bye

Terminate the FTP session with the remote server and exit ftp.

 

 

case

Toggle remote computer file name case mapping during mget

 

commands.

 

 

cd remote-directory

Change the working directory on the remote machine to

 

remote-directory.

 

 

cdup

Change the remote machine’s working directory to the parent of

 

the current remote machine’s working directory.

 

 

close

Terminate the FTP session with the remote server, and return to

 

the command interpreter.

 

 

cr

Toggle RETURN stripping during “network ASCII” type file

 

retrieval.

 

 

delete remote-file

Delete the file remote-file on the remote machine.

 

 

debug [ debug-value ]

Toggle debugging mode. If an optional debug-value is specified it

 

is used to set the debugging level.

 

 

dir [ remote-directory ]

Print a listing of the directory contents in the directory,

[ local-file ]

remote-directory, and, optionally, placing the output in local-file.

 

If no directory is specified, the current working directory on the

 

remote machine is used. If no local file is specified, output is sent

 

to the terminal.

 

 

disconnect

Terminate the FTP session with the remote server, and return to

 

the command interpreter.

Chapter 7 Configuring Networking 243

Switch/Command

Description

 

 

form [ format-name ]

Set the carriage control format subtype.

 

 

get

Retrieve the remote-file and store it on the local machine.

 

 

glob

Toggle filename expansion, or “globbing,” for mdelete, mget, and

 

mput. If globbing is turned off, filenames are taken literally.

 

 

hash

Toggle hash-sign (#) printing for each data block transferred.

 

 

help [ command ]

Print an informative message about the meaning of

 

thecommand.

 

 

lcd [ directory ]

Change the working directory on the local machine.

 

 

ls [ remote-directory ]

Print an abbreviated listing of the contents of a directory on the

[ local-file ]

remote machine.

 

 

macdef macro-name

Define a macro.

 

 

mdelete [remote-files]

Delete the remote-files on the remote machine.

 

 

mdir remote-files

Like dir, except multiple remote files may be specified.

local-file

 

 

 

mget remote-files

Expand the remote-files on the remote machine and do a get for

 

each file name thus produced.

 

 

mkdir directory-name

Make a directory on the remote machine.

 

 

mls remote-files

Like ls, except multiple remote files may be specified.

local-file

 

 

 

mode [ mode-name ]

Set the “transfer mode” to mode-name.

 

 

mput local-files

Expand wild cards in the list of local files given as arguments and

 

do a put for each file in the resulting list.

 

 

nmap

Set or unset the filename mapping mechanism.

[ inpattern outpattern ]

 

 

 

ntrans

Set or unset the filename character translation mechanism.

[ inchars [ outchars ] ]

 

 

 

open host [ port ]

Establish a connection to the specified host FTP server with

 

optional port selection.

 

 

prompt

Toggle interactive prompting.

 

 

proxy ftp-command

Execute an FTP command on a secondary control connection.

 

 

put local-file

Upload a local file to the remote machine.

remote-file

 

 

 

pwd

Print working directory.

 

 

quit

Terminate the FTP session with the remote server and exit ftp.

 

 

Continued

244 Part III Configuration

 

Table 7-4 (continued)

 

 

Switch/Command

Description

 

 

quote arg1 arg2 ...

Send the arguments specified, verbatim, to the remote FTP server.

 

A single FTP reply code is expected in return.

 

 

recv remote-file

Retrieve the remote-file and store it on the local machine.

[ local-file]

 

 

 

remotehelp

Request help from the remote FTP server.

[ command-name ]

 

 

 

rename from to

Rename the file retreived from the remote machine.

 

 

reset

Clear reply queue.

 

 

rmdir directory-name

Delete a directory on the remote machine.

 

 

runique

Toggle storing of files on the local system with unique filenames.

 

 

send local-file

A synonym for put.

[ remote-file ]

 

 

 

sendport

Toggle the use of PORT commands.

 

 

status

Show the current status of ftp.

 

 

struct [ struct-name ]

Set the “file structure” to struct-name.

 

 

sunique

Toggle storing of files on remote machine under unique file

 

names.

 

 

tenex

Set the “representation type” to that needed to talk to TENEX

 

machines.

 

 

trace

Toggle packet tracing (not used).

 

 

type [ type-name ]

Set the “representation type” to type-name.

 

 

user user-name

Identify yourself to the remote FTP server.

[password ][ account]

 

 

 

verbose

Toggle verbose mode.

 

 

? [ command ]

Print an informative message about the meaning of command.

 

 

The FTP command is not much use without the FTP server service running on the remote system. To provide this feature, the FTP program requires the ftpd daemon. Luckily, the ftpd daemon is started by the inetd by default. The inetd daemon listens for connections on port 20, in the /etc/inetd.conf and initiates the appropriate daemon when an FTP connection is requested.

Соседние файлы в предмете Операционные системы