hosts_optionsのヘルプ・マニュアル
日本語 英語
hosts_options --help
man hosts_options
HOSTS_OPTIONS(5) HOSTS_OPTIONS(5)
NAME
hosts_options - ホストアクセスコントロールの拡張書式
DESCRIPTION
こ の文書は、hosts_access(5) で説明する文法のオプショナルな拡張について
解説するものである。この拡張は、プログラムをコンパイルした際に利用の 可
否 が 決まる。例えば、Makefile を編集し、コンパイル時に PROCESS_OPTIONS
を有効にした場合である。
拡張書式はこのような形式である:
daemon_list : client_list : option : option ...
最初のふたつのフィールドについては、hosts_access(5) のマニュアルで解 説
さ れている。ルールの残りの部分は、0 個以上のオプションの列である。オプ
ションの中では、すべての ":" という文字はバックスラッシュによって保護さ
れる必要がある。
オ プションは "keyword" または "keyword value" の形式をとる。オプション
群は記述された順に解釈される。いくつかのオプションは % による置
き 換 えを仮定している。初期のバージョンとの互換性のために、"=" を key-
word と value(値) の間におく事も許されている。
LOGGING (ログの記録)
severity mail.info
severity notice
イベントをログに記録する severity("激しさ") のレベルを変更する。
Facility names (供される利便の項目、たとえば mail) は任意であり
、古い syslog の実装ではサポートされていない。severity オプシ ョ
ンは、指示されたイベントを強調するか、あるいは無視するために有意
である。
ACCESS CONTROL (アクセスの可否)
allow
deny サービスの可否。これらのオプションは、ルールの最後に記述しなけれ
ばならない。
allow と deny は、すべてのアクセスコントロールのルールを、ただひとつの
ファイル、たとえばhosts.allow に納める事を可能にしている。
明示されたホストだけにアクセスを許可するには:
ALL: .friendly.domain: ALLOW
ALL: ALL: DENY
トラブルメイカーとなる、いくつかのホストを除いて、すべてのホストから の
アクセスを許可するには:
ALL: .bad.domain: DENY
ALL: ALL: ALLOW
ドメイン名のパターンの最初にはドットがついている事に注目されたい。
RUNNING OTHER COMMANDS (外部コマンドの実行)
spawn shell_command
hosts_access(5) のマニュアルで解説される % の置き換えが
実行されたのちに、子プロセスで、指定のシェルコマンドを実行する。
コマンドは標準入力、標準出力、そして標準エラー出力を null デバイ
スに繋げた状態で実行される。したがって、これによってクライアント
ホストとの会話が混乱するようなことはない。例えば:
spawn (/some/where/safe_finger -l @%h | /usr/ucb/mail root) &
これは、%h を リモートホストの名前またはアドレスに置き換えたのち
に、バックグラウンドの子プロセスで、シェルコマンド "safe_finger
-l @%h | mail root" を実行する。
この例では、(リモートの) finger サーバーから送られてくるデータに
よって、ダメージがもたらされる可能性を抑えるため、標準 の "fin-
ger" コマンドに代わって "safe_finger" コマンドを利用している。こ
の "safe_finger" コマンドは、daemon wrapper package に含まれてい
る。これは、標準の finger の露払いとして、リモートホストから送ら
れるデータをフィルタリングする。
twist shell_command
hosts_access(5) のマニュアルで解説される % の置き換え が
実行されたのちに、現在のプロセスを、要求されたシェルコマンドで置
き換える。標準入力、標準出力そして標準エラー出力は、クライアント
のプロセスに接続される。このオプションはルールの最後に記述する必
要がある。
実際の ftp デーモンに代わって、メッセージを変更してクライアン ト
に返すには:
in.ftpd : ... : twist /bin/echo 421 Some bounce message
ク ラ イアントプロセスと会話する別の方法として、後述する banners
オプションを参照されたい。
/some/other/in.telnetd を、コマンドラインの引数やプロセスの環 境
変数によって汚染されることなく実行するには:
in.telnetd : ... : twist PATH=/some/other; exec in.telnetd
警 告: UDP サービスにおいては、standard I/O の利用、またはクライ
アントプロセスとの交信のための read(2)/write(2) ルー チ ン と 、
command を混同しないように; UCP は、また別の基本的な I/O を必要
とする。
NETWORK OPTIONS (ネットワークに関するオプション)
keepalive
定期的にサーバーはクライアントにメッセージを送るようになる。もし
、クライアントからの応答がない場合、接続は切断されたものと見なさ
れる。この keepalive オプションは、ユーザーがサーバーに継って い
る間に、マシンの電源を切った時に有用である。keepalive オプション
は datagram (UDP) services には役に立たない。
linger number_of_seconds
サーバーのプロセスが接続を切断したのち、カーネルが未配送データの
再送を試みる時間を指示する。
USERNAME LOOKUP (ユーザー名の問い合わせ)
rfc931 [ timeout_in_seconds ]
RFC 931 (TAP, IDENT, RFC 1413) にしたがう形で、クライアントユー
ザー名を問い合わせる。サービスが TCP 以外の転送方法に基づいて い
る場合は、このオプションは黙って無視される。この方法はクライアン
トのシステムが RFC 931 と互換性のあるデーモン (IDENT など) を 走
ら せていることが条件で、non-UNIX のクライアントからの接続に対し
ては、著しく遅くなるだろう。timeout までの秒数は任意 で あ る 。
timeout が指示されない場合、コンパイル時に決められた初期値が使わ
れる。
MISCELLANEOUS (その他の事項)
banners /some/directory
‘/some/directory’ の中で、デーモンプロセスの名前と一致するファイ
ル (たとえば、telnet サービスなら in.tenletd)を探し、その内容を
クライアントに対してコピーする。改行文字は 、CR(carriage-return)
改 行文字に置き換えられ、% は展開される (hosts_access(5)
のマニュアルを参照)。
tcp wrapper の配布ソースには、手際よく banner を保守するための、
サンプルの makefile (Banners.Makefile) が含まれている。
警告: banners は connection-oriented (TCP) network (コネクション
に指向の高いサービス)でのみ利用する事ができる。
nice [ number ]
プロセスの nice 値を変更する(初期値は 10)。他のプロセスに、よ り
多くの CPU 資源を割り当てるには、正の値を指示する。
setenv name value
(name, value) の ペアをプロセスの環境変数に設定する。value は
% への展開があるものと仮定され、ホワイトスペースの利用は
自制する必要があるだろう(ただし、前後の空白は切り捨てられる)。
警告: 多くのネットワークデーモンは login または shell プロセスを
再起動する前に、その環境変数をリセットする。
umask 022
シェルのビルトインコマンド umask と似た機能。022 の umask は 、
group と world による書き込み禁止措置によって、ファイルの作成を
予防する。umask の引数は 8 進数でなければならない。
user nobody
user nobody.kmem
ユーザー "nobody" (またはユーザー "nobody", グループ "kmem")は、
特 別な扱いとみなす。最初の形式は、root 権限で全てのサービスを実
行するような inetdの実装で有用である。二番目の形式は、グループの
権限のみが必要なサービスのために有用である。
DIAGNOSTICS
アクセスコントロールルールに文法エラーが発見された場合、エラーは syslog
デーモンへ報告される。余計なオプションは無視され、サービスは拒否され る
。
SEE ALSO
hosts_access(5), 基本的なアクセスコントロール書式
AUTHOR
Wietse Venema (wietse@wzv.win.tue.nl)
Department of Mathematics and Computing Science
Eindhoven University of Technology
Den Dolech 2, P.O. Box 513,
5600 MB Eindhoven, The Netherlands
翻訳者
FUKUSHIMA Osamu/福島於修
HOSTS_OPTIONS(5)
HOSTS_OPTIONS(5) HOSTS_OPTIONS(5)
NAME
hosts_options - host access control language extensions
DESCRIPTION
This document describes optional extensions to the language described
in the hosts_access(5) document. The extensions are enabled at program
build time. For example, by editing the Makefile and turning on the
PROCESS_OPTIONS compile-time option.
The extensible language uses the following format:
daemon_list : client_list : option : option ...
The first two fields are described in the hosts_access(5) manual page.
The remainder of the rules is a list of zero or more options. Any ":"
characters within options should be protected with a backslash.
An option is of the form "keyword" or "keyword value". Options are pro-
cessed in the specified order. Some options are subjected to %
substitutions. For the sake of backwards compatibility with earlier
versions, an "=" is permitted between keyword and value.
LOGGING
severity mail.info
severity notice
Change the severity level at which the event will be logged.
Facility names (such as mail) are optional, and are not sup-
ported on systems with older syslog implementations. The sever-
ity option can be used to emphasize or to ignore specific
events.
ACCESS CONTROL
allow
deny Grant (deny) service. These options must appear at the end of a
rule.
The allow and deny keywords make it possible to keep all access control
rules within a single file, for example in the hosts.allow file.
To permit access from specific hosts only:
ALL: .friendly.domain: ALLOW
ALL: ALL: DENY
To permit access from all hosts except a few trouble makers:
ALL: .bad.domain: DENY
ALL: ALL: ALLOW
Notice the leading dot on the domain name patterns.
RUNNING OTHER COMMANDS
spawn shell_command
Execute, in a child process, the specified shell command, after
performing the % expansions described in the
hosts_access(5) manual page. The command is executed with
stdin, stdout and stderr connected to the null device, so that
it won´t mess up the conversation with the client host. Example:
spawn (/some/where/safe_finger -l @%h | /usr/ucb/mail root) &
executes, in a background child process, the shell command
"safe_finger -l @%h | mail root" after replacing %h by the name
or address of the remote host.
The example uses the "safe_finger" command instead of the regu-
lar "finger" command, to limit possible damage from data sent by
the finger server. The "safe_finger" command is part of the dae-
mon wrapper package; it is a wrapper around the regular finger
command that filters the data sent by the remote host.
twist shell_command
Replace the current process by an instance of the specified
shell command, after performing the % expansions
described in the hosts_access(5) manual page. Stdin, stdout and
stderr are connected to the client process. This option must
appear at the end of a rule.
To send a customized bounce message to the client instead of
running the real ftp daemon:
in.ftpd : ... : twist /bin/echo 421 Some bounce message
For an alternative way to talk to client processes, see the ban-
ners option below.
To run /some/other/in.telnetd without polluting its command-line
array or its process environment:
in.telnetd : ... : twist PATH=/some/other; exec in.telnetd
Warning: in case of UDP services, do not twist to commands that
use the standard I/O or the read(2)/write(2) routines to commu-
nicate with the client process; UDP requires other I/O primi-
tives.
NETWORK OPTIONS
keepalive
Causes the server to periodically send a message to the client.
The connection is considered broken when the client does not
respond. The keepalive option can be useful when users turn off
their machine while it is still connected to a server. The
keepalive option is not useful for datagram (UDP) services.
linger number_of_seconds
Specifies how long the kernel will try to deliver not-yet deliv-
ered data after the server process closes a connection.
USERNAME LOOKUP
rfc931 [ timeout_in_seconds ]
Look up the client user name with the RFC 931 (TAP, IDENT, RFC
1413) protocol. This option is silently ignored in case of ser-
vices based on transports other than TCP. It requires that the
client system runs an RFC 931 (IDENT, etc.) -compliant daemon,
and may cause noticeable delays with connections from non-UNIX
clients. The timeout period is optional. If no timeout is spec-
ified a compile-time defined default value is taken.
MISCELLANEOUS
banners /some/directory
Look for a file in ‘/some/directory’ with the same name as the
daemon process (for example in.telnetd for the telnet service),
and copy its contents to the client. Newline characters are
replaced by carriage-return newline, and % sequences are
expanded (see the hosts_access(5) manual page).
The tcp wrappers source code distribution provides a sample
makefile (Banners.Makefile) for convenient banner maintenance.
Warning: banners are supported for connection-oriented (TCP)
network services only.
nice [ number ]
Change the nice value of the process (default 10). Specify a
positive value to spend more CPU resources on other processes.
setenv name value
Place a (name, value) pair into the process environment. The
value is subjected to % expansions and may contain
whitespace (but leading and trailing blanks are stripped off).
Warning: many network daemons reset their environment before
spawning a login or shell process.
umask 022
Like the umask command that is built into the shell. An umask of
022 prevents the creation of files with group and world write
permission. The umask argument should be an octal number.
user nobody
user nobody.kmem
Assume the privileges of the "nobody" userid (or user "nobody",
group "kmem"). The first form is useful with inetd implementa-
tions that run all services with root privilege. The second form
is useful for services that need special group privileges only.
DIAGNOSTICS
When a syntax error is found in an access control rule, the error is
reported to the syslog daemon; further options will be ignored, and
service is denied.
SEE ALSO
hosts_access(5), the default access control language
AUTHOR
Wietse Venema (wietse@wzv.win.tue.nl)
Department of Mathematics and Computing Science
Eindhoven University of Technology
Den Dolech 2, P.O. Box 513,
5600 MB Eindhoven, The Netherlands
HOSTS_OPTIONS(5)