=head1 NAME Zebedee --- シンプルでフリーでセキュアなトンネルプログラム =begin License Zebedee Manual For license terms, see the "CREDITS AND LEGALITIES" at the bottom of this document. Japanese Version Copyright (c) 2000 NAKAJIMA Taku all rights reserved. Translated Thu Jul 13 10:29:22 JST 2000 by NAKAJIMA Taku =end License =begin JM-comment .\"Zebedee --- a simple, free, secure tunnel program =end JM-comment =head1 書式 =over 4 =item Server: B B<-s> [B<-dDtu>] [B<-f> I] [B<-k> I] [B<-n> I] [B<-o> I] [B<-r> I] [B<-v> I] [B<-x> I] [B<-z> I] [I] =item Client: B [B<-dDmtu>] [B<-e> I] [B<-f> I] [B<-k> I] [B<-n> I] [B<-o> I] [B<-v> I] [B<-x> I] [B<-z> I] [[I:]I[:I]] =item Key generation: B B<-p> [B<-f> I] B B<-P> [B<-p>] [B<-f> I] =item Hash generation: B B<-h> [I] B B<-H> I ... =item Windows Service: B [B<-n> I] B<-S> [install[=I] | remove | run] =back =head1 DESCRIPTION =begin JM-comment B is a simple program to establish an encrypted, compressed "tunnel" for TCP/IP or UDP traffic between two systems. This allows data from, for example, B, B and B sessions to be protected from snooping. You can also use compression, either with or without data encryption, to gain performance over low-bandwidth networks. =end JM-comment Bは2つのシステム間で、 暗号化され、圧縮されたTCP/IPまたはUDPの"トンネル"を確立する単純なプログラムである。 これは、低帯域のネットワーク上でのパフォーマンスを圧縮により向上するだけでなく、 B, B や B などの TCP ベースの トラフィックを盗聴から防御することも可能にする。 また、暗号化の有無にかかわらずデータ圧縮を使用することで、 遅いネットワークで良好なパフォーマンスを得ることも可能である。 =begin JM-comment The main goals for B are to: =end JM-comment B の主な目的は: =over 4 =item * =begin JM-comment Provide client and server functionality under both UNIX and Windows 95/98/NT. =end JM-comment UNIX と Windows 95/98/NT の双方にてクライアントとサーバーの機能を提供する。 =item * =begin JM-comment Be easy to install, use and maintain with little or no configuration required. =end JM-comment ほんの少しの設定か全くの設定無しで簡単にインストール、使用、保守ができる。 =item * =begin JM-comment Have a small footprint, low wire protocol overhead and give significant traffic reduction by the use of compression. =end JM-comment 少しの付加データと、少ないプロトコルのオーバヘッドにて、 圧縮により多大なトラフィックの低減を行う。 =item * =begin JM-comment Use only algorithms that are either unpatented or for which the patent has expired. =end JM-comment 特許化されていないか、または特許の有効期限が切れているアルゴリズムのみを用いる。 =item * =begin JM-comment Be entirely free for commercial or non-commercial use and distributed under the term of the GNU General Public Licence (see L). =end JM-comment GNU 一般公有使用許諾書(GPL)のもとで商用、非商用を問わず 完全にフリーに使用・配布ができる (L を見よ)。 =back =begin JM-comment Of course, B is by no means the first, or only secure tunnel program available. It does not pretend to compete with the likes of B or B in terms of breadth of function but if you want something quick, simple and I then it may be the tool for you. =end JM-comment もちろん、B は初めてのあるいは唯一の利用可能な セキュアなトンネルプログラムではない。 高機能という面では B や B などとは比べ物にもならないが、 もし、素早く、単純で、B<完全にフリー>なものを求め ているなら、これはピッタリのツールだろう。 =begin JM-comment This document describes the features of B as at release 2.0.0. =end JM-comment この文書は B リリース 2.0.0 の機能について記している. =head2 名前の由来は?(What's in a name?) =begin JM-comment In case you were wondering, or even if you weren't, B is named after its three main components: =end JM-comment あなたが疑問を持とうが持つまいが、B は次の 3つの主要なコンポー ネントから命名された。 =over 4 =begin JM-comment =item * Blib compression =item * Blowfish encryption and =item * Biffie-Hellman key agreement. =back So now you know! =end JM-comment =item * Blib による圧縮 =item * Blowfish による暗号化 =item * Biffie-Hellman による認証 =back これでわかったよね? =head2 基本的な使い方(Basic Usage) =begin JM-comment To set up a secure connection between your local machine and a remote host you need first to run B in server mode on the remote system. The easiest way to do this is to run B with the B<-s> option. Like this: =end JM-comment ローカルマシンとリモートホストを安全に接続するには、 まずリモートホストの方で、B をサーバーモードで起動する必要がある。 一番簡単な方法は、B<-s> オプションを使うことだ。 zebedee -s =begin JM-comment If all goes well (and it should!) B will detach from the terminal (or console window under Windows) and run in the background. It will then be listening for incoming requests from clients. =end JM-comment うまくいけば(いくはず!)Bは 端末(windowsではコンソールウインドウ)から切り離されてバックグラウンドで走る。 そして、クライアントからの接続を待つ。 =begin JM-comment On your local machine you then run B in client mode. You need to specify the name of the remote machine and the name of the service or number of the port to which the tunnel should be established --- we will call this the "target" port. If the remote machine is called C and you want to set up a secure B session then you would run: =end JM-comment 次にクライアントマシンでBをクライアントモードで起動する。 この場合は、リモートホストのホスト名とトンネルすべきサービス名かポート番号 (ここではこれをターゲットポートと呼ぶことにする)を指定する。 例えば、リモートホストの名前がCで 安全なBセッションを張りたいとしたら、こうなる。 zebedee remhost:telnet =begin JM-comment In fact, if you don't specify a service or port the default is B so =end JM-comment 実際には、ポートのデフォルトがtelnetなので このケースでは次のように省略してもよい。 zebedee remhost =begin JM-comment would do just as well in this instance. When you run this command it will print out a message telling you the port number which is the local end of the tunnel. B will then detach from the terminal and run in the background waiting for you to connect to the local port. If, for example, the port number it printed out was 1234 then to connect to C using the secure tunnel you would run: =end JM-comment このコマンドを実行すると、 トンネルの入口になる(ローカル側の)ポートの番号が表示される。 Bは端末から切り離されてバックグラウンドで走り、 このローカル側のポートに接続されるのを待つ。 例えば、1234と表示されたら、 telnet localhost 1234 とすれば、Cに安全なトンネル経由で接続される。 =begin JM-comment By default, B will continue to listen for connections and tunnel them, handling multiple simultaneous connections if necessary, until you terminate the process. Sometimes you will want to start B and then run a command that connects to the port straight away. You can do this in a single invocation of B as follows: =end JM-comment デフォルトでは、Bはプロセスを終了させるまで接続を待ち続けて、 必要があれば同時発生する複数のコネクションを処理する。 時には、Bを起動し、 その後すぐにそのポートに接続するコマンドを起動したいこともあるだろう。 これを一発でやるには次のようにする。 zebedee -e "telnet localhost %d" remhost =begin JM-comment The "C<%d>" in the string is automatically replaced with the local port number so there is no need for B to print it out. If you specify a command like this then the local B client will exit once the command closes its connection. =end JM-comment 文字列中の"C<%d>"がローカルポート番号と置き換えられる。従って、 Bはポート番号を表示しない(する必要がない)。 このようにコマンドを指定した場合には、そのコマンドが接続を終了すると同時に、 ローカル側のBクライアントも終了する。 =begin JM-comment You may want or need to control the local port number that the client uses. This is necessary if the command whose connection you are trying to protect expects to connect only to a specific port. In this case you can also specify the local port number by invoking B as follows: =end JM-comment クライアントが使用するローカルポート番号を指定したい(する必要がある)こともあるだろう。 (保護したい通信を行なう)コマンドが、特定のポートに接続しようとする場合だ。 この場合は、Bを次のように起動することで、 ローカルポートを指定することもできる。 zebedee clientport:hostname:targetport =begin JM-comment So, for example, the command: =end JM-comment 例えば、次のコマンド: zebedee 8000:webhost:80 =begin JM-comment will allow you to secure all HTTP connections to B if accessed via port 8000 on the client system. See L for more details. You can also use a single B client to handle multiple simultaneous tunnels to different target ports on the same remote host. In this case the client and target port specifications are lists of ports. For example: =end JM-comment は、クライアントの8000番ポート経由で接続する、 Bへの全てのHTTP接続を保護する。 詳細はL参照のこと。 また、B クライアントは 同一ホスト内の複数のターゲットポートに対して、 複数のトンネルを(同時並行的に)扱うこともできる。 この場合は、ローカルとリモートのポートの指定はポート番号のリストになる。 例えば zebedee 9001,9002,9003:somehost:daytime,telnet,ftp =begin JM-comment This will tunnel traffic on the clientport 9001 to the B port on the remote target system, traffic on 9002 to the B port and traffic on 9003 to the B port. See the B> and B> keywords for more details. =end JM-comment これは、9001番のクライアントポートへの通信を、 リモートのターゲットシステムのBポートへとトンネルする。 同様に、9002番はBポートへ、9003番はBポートへトンネルする。 詳細は B>と B>を参照のこと。 =head2 UDPトンネリング(UDP Tunnelling) =begin JM-comment Originally B was designed only to be able to handle TCP/IP traffic. As of version 2.0.0 it can also handle connectionless UDP data. To enable this start B with the B<-u> option (or use the B> keyword). For example: =end JM-comment Bはもともとは TCP/IP のトラフィックだけを扱うように設計されたが、 バージョン2.0.0からはコネクションレスのUDPのデータも扱えるようになった。 この機能を有効にするにはBを B<-u> オプション付きで起動する (または、B> キーワードを使用する)。 例えばサーバ側で zebedee -s -u =begin JM-comment on the server host and =end JM-comment クライアント側で zebedee -u 10000:somehost:echo =begin JM-comment on the client. Note that a single client or server can only handle TCP or UDP data, not both. If you need to tunnel both types of data you must run two separate instances. It is safe run both a TCP-mode and a UDP-mode server on the same system because they use different ports. =end JM-comment を実行する。なお、ひとつのクライアントとサーバは、TCPかUDPのどちらかを扱い、 両方同時に扱うことはできない。両方のタイプをトンネルするには、 2つの独立したインスタンスを起動する。 TCPモードとUDPモードのサーバは違うポートを使うので、 両者を同じシステムで起動することは安全である。 =begin JM-comment The tunnel between B clients and servers still uses a TCP/IP connection even in UDP-mode. This connection is timed out after a certain period of inactivity. It must be re-established if more data arrives. For this reason the performance in UDP mode may appear poor, depending on the nature of the application using it. You should note that there is also a limit on the size of UDP datagrams that can be handled. =end JM-comment UDPモードでもBのクライアントとサーバ間のトンネルはTCP/IPで接続する。 この接続は無通信が一定時間続くとタイムアウトする。 タイムアウトしてからさらにデータが来るとトンネルの再接続を行う必要があるので、 アプリケーションの特性によっては UDPモードのパフォーマンスがよくないように見えることもある。 また、扱えるUDPダイアグラムのサイズにも制限があることにも注意すること。 =begin JM-comment For further details see the B>, B> and B> keywords. =end JM-comment 詳細は、B>、 B>、 B> を参照のこと。 =head2 言葉の定義(Some Terminology) =begin JM-comment Usually there will only be two systems involved when you run B. You will run a client on one and communicate with it via connections to local ports. On the other you will run a server which will speak to services local to that machine. However, there can be up to four different systems involved, as shown below: =end JM-comment 通常は、Bを使用する場合、関係するシステムは2つである。 片方でクライアントを起動して、ローカルポートでそれと通信する。 反対側ではサーバを起動して、そのシステムで動作しているサービスと会話する。 しかしながら、次のように最大4つのシステム(マシン)が関係するケースもありえる。 =begin JM-comment [source] <===> [client] <=====> [server] <===> [target] | | | +- insecure | + insecure connection | connection +- secure tunnel The B client runs on the "client" system and the server runs on the "server" host. The inital connection that causes a tunnel to be established between client and server originates from the "source" machine. This could be a different system than where the B client is running, although it is usually the same. The server will ultimately communicate with the "target" system. Again, this is usually the local machine but does not have to be. =end JM-comment [ソース] <===> [クライアント] <=====> [サーバ] <===> [ターゲット] | | | +- 安全でない | + 安全でない 接続 | 接続 +- 安全なトンネル Bのクライアントは「クライアント」システムで、 サーバは「サーバ」システムでそれぞれ動作している。 トンネル設定の契機となる最初の接続は「ソース」マシンから発生する。 「ソース」と「クライアント」は違うシステムであってもかまわないが、 通常は同一のシステムである。 サーバは最後に「ターゲット」システムと通信する。 ターゲットも普通はソースと同じマシンになるが、違うマシンであっても全く問題はない。 =begin JM-comment Most of the time you will not have to be concerned with the distinction between source and client and server and target. The terminology is, however, reflected in a number of the keywords described in the following section so you should bear it in mind when reading their descriptions. =end JM-comment ほとんどの場合、「ソース」と「クライアント」、 「サーバ」と「ターゲット」の違いを気にする必要はない。 しかし、この用語の区別が以下に述べるキーワードに多く反映している。 キーワードの説明を読む時には、このことを頭に入れておいたほうがいいだろう。 =begin JM-comment In addition to the different systems involved in B tunnel there are also several different types of keys used to secure connection. The client and server generate or are provided with B values. These are used to calculate public values which are exchanged and used to derive a B using the Diffie-Hellman key agreement mechanism. From this shared key a unique B is derived to secure an individual connections between client and server. =end JM-comment Bのトンネルに関係するこの4つシステムの問題と別に、 安全に接続するために、いくつかの全く違うタイプの「キー(key)」が使われる。 クライアントとサーバはB(秘密鍵)という値を必要とする (自分で生成する場合もある)。 このキーからは、public values が計算され交換され、 それによりB が導き出される (この時にDiffie-Hellman key agreement mechanism が使用される)。 このキーからは、接続のたびにユニークなBが導き出され、 最終的にこのキーで暗号化が行なわれる。 =head2 設定ファイル(Configuration File) =begin JM-comment The behaviour of B is probably best controlled through the use of a configuration file. A configuration file can be specified using the B<-f> command-line option. The file is read at the point at which the option is encountered so later command-line options may override the contents of the file. =end JM-comment B の動作をコントロールするには、 設定ファイルを使うのがおそらく一番よい。設定ファイルを指定するには コマンドラインオプションで B<-f>を使う。ファイルは(B<-f>)オプションの位 置で処理される。従って、それ以降のコマンドラインオプションでファイルの内 容を上書きすることができる。 =begin JM-comment Lines are of the form: =end JM-comment 行の形式は以下のとおり。 key value # optional comment =begin JM-comment The I is a single, case-insensitive word. The value is either a single word or a string. Strings are enclosed either in double quotes (C<"like this">) or single quotes (C<'like this'>). Double quotes may appear in single quoted strings and vice versa (C<"here's an example">). Case is preserved in the values where appropriate. =end JM-comment Iはひとつの単語であり大文字小文字は無視される。Iは単語か文字 列かどちらかである。 文字列はダブルクォート(C<"こんな風に">)かシングルクォート (C<'こんな風に'>)でくくられる。ダブルクォート " の中に シングルクォート ' があってもよいし(C<"here's an example">)、その逆も言える。 value では大文字小文字の違いは区別される。 =begin JM-comment Blank lines and lines beginning with a "C<#>" (after any leading whitespace) are ignored. Long strings may be continued onto the next line by ending the line with a "C<\>" character. This character is eliminated and the next line is joined on to the end. Note that there is a limit of a total of 1024 characters on any line and its continuations. Line continuation happens before anything else, including comment recognition so the lines: =end JM-comment 空白行と"C<#>"ではじまる行(その前に空白があっても同じ)は無視される。 長い文字列は "C<\>"で次の行に継続することもできる。 この文字は除去され、次の行がこの行に接続される。 1行の長さは継続行も含め 1024 文字に制限されていることに注意。 行の接続はコメントの認識を含めすべての処理に先だって行われる。 そのため以下の例 server false # This comment continues on the next line \ server true =begin JM-comment will leave the value of B as B. =end JM-comment では、Bの値は Bになる。 =begin JM-comment The keys and their meanings are as described below. Most, but not all, keys have equivalent command-line options. These are shown where available. There are also a few command-line options that have no equivalent in the configuration file. These are described at the end of this section. =end JM-comment キーワードとその意味は以下に述べる。 ほとんどのキーワードは対応するコマンドラインオプションがあるが、 なかには対応するオプションがないものもある。 対応するコマンドラインオプションがあるものについてはそれも併記してある。 逆に、コマンドラインオプションの中には 設定ファイル内のキーワードに対応するものがないものもある。 それらはこのセクションの最後に述べる。 =begin JM-comment If a key is described as being a boolean then its value must be one of the words B or B. =end JM-comment キーワードが真偽値(boolean)と書かれていたら、 その値は"B" または "B"でなければならない。 =begin JM-comment Several keys require a list of ports to be specfied. Where this the case the value is string that consists of a comma or white-space delimited list of port names, numbers or numeric ranges. For example "C". This is equivalent to the list "C<23,21,5900,5901,5902,5903>". =end JM-comment キーワードの中にはポートのリストを指定するものがある。 この場合は、ポート名(サービス名)、ポート番号、番号の範囲を コンマか空白で区切ったものを指定する。 例えば、"C"は "C<23,21,5900,5901,5902,5903>"と等しい。 =begin JM-comment A number of the keys are either only applicable to clients or only applicable to servers. The same B program runs as either client or server and will silently ignore inappropriate options for the current type of usage. The choice of client or server behaviour is controlled by the B> keyword: =end JM-comment また、クライアントだけに指定するキーワードもあるし、 サーバだけに指定するキーワードもある。 ひとつの B プログラムはサーバかクライアントかどちらかひとつの機能を実行し、 その時の用途と違う用途向けのオプションは無視する。 エラーメッセージも表示しない。 サーバになるかクライアントになるかは、 B> キーワードで決まる。 =over 4 =item B (コマンドラインでは B<-s>) =begin JM-comment This is a boolean indicating whether the program should run as a client or a server. The default is to run as a client if this key is not specified. The command-line B<-s> option is equivalent to setting this keyword to B. =end JM-comment これは、クライアントになるかサーバになるかを決める真偽値のキーワードである。 これが指定されなかった場合は、クライアントとして動作する。 コマンドラインオプションの B<-s> オプションはこの値をBにするのと等しい。 =back =head3 クライアント専用キーワード(Client-Only Keywords) =begin JM-comment The following keywords apply only to B clients: =end JM-comment 以下のキーワードはクライアントだけに適用される。 =over 4 =item B (コマンドラインでは B<-e>) =begin JM-comment When running as a client, this is a command that will be spawned to run connected to the tunnel. If the value contains the character sequence "C<%d>" this will be replaced at run-time with the local port number (see the B> keyword). As this is done using B the conventions of that routine apply with regards to escaping "C<%>" characters (i.e. use "C<%%>" to generate a single "C<%>"). In addition, specifying more that one "C<%d>" or other format sequence will very likely crash the program. =end JM-comment クライアントとして動作している時に意味を持つ。 これは、トンネルへ接続した後に起動されるコマンドを示す。 この値が "C<%d>" という文字列を含んでいたら、実行時にローカルポート番号と置き変えられる (B> 参照)。 この処理はB関数を使用して行なうので、 "C<%>"によるエスケープ処理が適用される (すなわち、"C<%>" を 1 文字生成するためには "C<%%>" を使う)。 さらに、"C<%d>" を二つ以上指定したり "C<%d>" 以外のフォーマット指定子 を指定すると、おそらくプログラムはクラッシュするだろう。 =begin JM-comment Once the command closes its connection B will exit. Using this keyword or option implicitly turns off multi-use mode (see B>). You can not use automatic command spawning when a single B client is handling multiple connections in B> mode or when a list of ports has been specified with the B> keyword. =end JM-comment コマンドが接続を閉じたら、Bも終了する。 このキーワードおよびオプションを使用すると、暗黙のうちにマルチユースモードがOFFになる (B>参照)。 B クライアントが複数の接続を扱う場合 (B>)やポートのリストが B>で指定された場合は、コマンドの自動起動は 使用することができない。 =item B =begin JM-comment This is the port or list of ports on which the B client will listen for connections. =end JM-comment これはB クライアントがローカル接続のためにlistenすべき、 ひとつのポート番号かポート番号のリストである。 =begin JM-comment If the client is going to tunnel to a single target port then then this value may be omitted in which case the client port will be assigned automatically (and a message will be printed to the terminal giving the port number). =end JM-comment もしクライアントがトンネルするのが単独のリモートポートならば、 これは省略できる。 その場合はポートは自動的に割り当てられて、 端末にポート番号を示すメッセージが表示される。 =begin JM-comment If a list of ports is given then the number of ports in the list must exactly match that in the list of target ports, whether specified on the command-line or via the B> keyword. =end JM-comment ポート番号のリストを指定する時は、リモートポートがコマンドラインで指定されたのであれ、 B> キーワードで指定されたのであれ、 ポートの数は正確にリモートポートの数と一致しなければならない。 =begin JM-comment Prior to version 2.0.0 this was known as the B keyword. This is still recognised for backwards compatibility. =end JM-comment 2.0.0より前のバージョンでは、同じ意味でBというキーワードが使用されていた。 後方互換性のために、このキーワードは現バージョンでも認識される。 =item B =begin JM-comment If this value is B then the client will only accept connections originating from the local machine. In other words the "source" system must be the same as the "client" system. =end JM-comment この値がBだと、クライアントはローカルマシンで発生した接続だけを受けつける。 別の言葉で言うと、「ソース」と「クライアント」が同一のシステムである必要がある。 =begin JM-comment The default is for this value to be B and for connections to be allowed from any arbitrary source machine. =end JM-comment この値はデフォルトはBであり、どのマシンがソースとなっても接続を受けつける。 =item B (コマンドラインでは B<-m>) =begin JM-comment If this value is B, which is the default, then the B client will handle multiple (potentially simultaneous) connection requests and will establish a new tunnel to the server for each one. If it is false, the client runs in "single-use" mode and exits after the first connection to the server has been closed. =end JM-comment この値がBだと(デフォルトではそうなっているが)、 Bのクライアントは複数の接続要求(同時並行的に発生してもよい)を扱い、 要求ひとつひとつに対して、新しいトンネルを設置する。 値がBだと、クライアントはシングルユースモードで動作し、 最初の接続が閉じられた直後に終了する。 =begin JM-comment The command-line B<-m> option is equivalent to setting this to B. This is the default behaviour in the current version of B and the option is retained only for backwards-compatibility reasons. =end JM-comment コマンドラインのB<-m>オプションはこれをBに設定するのと等しい。 現在のバージョンのBはこれがデフォルトだが (だから、このオプションを設定する必要はないが)、 後方互換性のために残されている。 =begin JM-comment Any client listening on multiple ports will automatically run in "multi-use" mode, even if this is set B (see B>). =end JM-comment クライアントが複数のポートを待ち受ける場合は、 たとえこれがBに設定されていても、 自動的に マルチユースモードになる。 (B> 参照) =item B =begin JM-comment This is the name of the host on which a B server is running and to which a tunnel is to be connected. There is no default and a host name must be specified either in a configuration file or on the command line. =end JM-comment これはトンネルを接続すべきリモートホストの名前である。 ホストの名称にはデフォルトはないので、 設定ファイルかコマンドラインのどちらかで、 必ずこれを指定しなければならない。 =begin JM-comment Prior to version 2.0.0 this was known as the B keyword. This is still recognised for backwards compatibility. =end JM-comment 2.0.0より前のバージョンでは、同じ意味でBというキーワードが使用されていた。 後方互換性のために、このキーワードは現バージョンでも認識される。 =item B =begin JM-comment #2.0 This is the port or list of ports to which the client will request that B server should establish connections on the target host. The default if not specified is B (port 23). =end JM-comment ここに指定したポート番号(リストも可)でターゲットホストに接続するように、 BクライアントがBサーバに要求する。 これが指定されない時のデフォルトは"B" (ポート番号 23)である。 =begin JM-comment If a list of ports is given then the number of ports in the list must exactly match that in the list of client ports, whether specified on the command-line or via the B> keyword. =end JM-comment ポート番号のリストを指定する時は、 ローカルポートがコマンドラインで指定されたのであれ、 B> キーワードで指定されたのであれ、 ポートの数は正確にローカルポートの数と一致しなければならない。 =begin JM-comment Prior to version 2.0.0 this was known as the B keyword. This is still recognised for backwards compatibility. =end JM-comment 2.0.0より前のバージョンでは、同じ意味でBというキーワードが使用されていた。 後方互換性のために、このキーワードは現バージョンでも認識される。 =back =head3 サーバ専用キーワード(Server-Only Keywords) =begin JM-comment The following keywords apply only when running as a server: =end JM-comment 以下のキーワードはサーバとして動作する時に適用する。 =over 4 =item B (コマンドラインでは B<-r>) =begin JM-comment This is a list of the ports on the target system to which the server will accept requests to redirect data. For example "C". If no B keyword is specified then requests to redirect traffic to any port will be accepted. While this is convenient for testing it may pose a security risk so you should specify an explict list of allowed ports if at all possible. =end JM-comment このキーワードはサーバがリダイレクトするポートのリストである。 (例 "C") もし B キーワードが指定されない場合は、 どのポートへのトンネル接続要求も受け付けられる。 この方法(Bを指定しないこと)はテスト中には便利だが、 セキュリティー面でのリスクがあるので、 もし可能ならば(このキーワードで)明示的に許可するポートを指定すべきである。 =begin JM-comment The keyword (or B<-r> option) may be specified multiple times in which case redirection will be allowed to any of the ports specified. =end JM-comment このキーワード(またはB<-r>オプション)は複数指定されてもよい。この場合は、 そのうちどれかのポートに指定されていればリダイレクトが許可される。 =item B =begin JM-comment By default a B server will redirect all incoming tunnelled data to ports on the local machine. If this keyword is specified it names the host to which all redirections will be made. This can be useful if the overhead of managing B tunnels is being offloaded onto a machine that connects to the final destination machine via an otherwise secure network. It can also be useful in tunnelling B traffic. See L for more details. =end JM-comment デフォルトではB サーバは 全てのトンネルをローカルマシンのポートにリダイレクトする。 もし、このキーワードが指定されると、 全ての接続はその名称のホストへとリダイレクトされる。 トンネルを安全なネットワークの中にまで延長するのは無駄であるが、 この機能を使用すると、そのオーバーヘッドを省くことができて便利である。 また B のトラフィックをトンネルする時にも使える。 (詳細はL参照) =begin JM-comment The name of the host to which to redirect traffic may also be specified as a final, optional parameter on the command-line when B is run in server mode. =end JM-comment Bがサーバモードで動作する時は、 通信をリダイレクトすべきホストの名称は、 コマンドラインの最後の付加的なパラメータとして指定することもできる。 =begin JM-comment Prior to version 2.0.0 this was known as the B keyword. This is still recognised for backwards compatibility. =end JM-comment 2.0.0より前のバージョンでは、同じ意味でBというキーワードが使用されていた。 後方互換性のために、このキーワードは現バージョンでも認識される。 =back =head3 圧縮と暗号化関連のキーワード(Compression and Encryption Keywords) =begin JM-comment The following keywords control the compression and encryption of data passing through the tunnel. They apply to both clients and servers: =end JM-comment 以下のキーワードは、トンネル内を流れるデータの圧縮と暗号化を制御する。 これらは、クライアントとサーバどちらでも使用される。 =over 4 =item B (コマンドラインでは B<-z>) =begin JM-comment B can support both B and, if enabled when it is built, B compression. This keyword specifies the type and level of compression to be used. The value is of the form I where I is either "C" or "C" and I is an integer from 0 to 9. As a special case an integer without any prefix implicitly selects a B compression level. =end JM-comment B は圧縮方式として B をサポートする。 そして、もしコンパイル時に有効になっていればBもサポートする。 このキーワードで圧縮の方式と圧縮レベルを指定する。 この値の形式は I である。I は "C" と "C"のどちらか、I は0から9の整数である。 プレフィックスなしで整数だけの場合は、Bが選択される。 =begin JM-comment The level specifies the maximum compression level to used (9 is the maximum and 0 is no compression). The actual compression level used will be the minimum of the client's and server's values. For these purposes all B levels (except 0) are considered to be greater than all B levels so if either client or server does not support B the protocol degrades gracefully to using B. The default compression value is "C". =end JM-comment I は使用可能な最大の圧縮レベルを設定する (9が最大で0が圧縮なし)。 実際に使用される圧縮レベルは、クライアントの値とサーバの値の最小値である。 この目的では、(0以外の)BレベルはいかなるBレベルの値より上であるとみなされる。 従って、サーバとクライアントのいずれかがBレベルをサポートしていなければ、 プロトコルはBを選択する。 デフォルトの圧縮レベルは"C"である。 =begin JM-comment Note that, because of the way that B compression works and the buffer sizes that B uses, B will probably only be useful if continuous streams of data are flowing. On smaller transfers, such as those in a normal B session, B will usually win. You will have to experiment to see what works best for you. In addition, because the buffer size is small there is no gain from using B levels above 1 and B will round any higher values down to this level. =end JM-comment B圧縮の動作方式とバッファーサイズのために、 Bは連続的なデータのストリームが流れる場合にだけ使う意味がある。 通常のBセッションのような、小さな転送ではBの方が性能がよい。 どちらがあなたにとってよく働くかは、実験してみないとわからないだろう。 加えて、バッファーサイズが小さいので、Bの1より上からは得るものがない。 Bはこれより上の値はこの値に変更する。 =begin JM-comment You can see exactly how much compression is gaining you at verbosity levels 2 and above when basic statistics are printed out on connection termination. For example: =end JM-comment verbosity levelを2以上にすれば、 接続が終了した時に基本的な統計値がプリントアウトされるので、 どれだけ圧縮が有効だったか正確に知ることができる。 例えば、 zebedee(232/210): read 166 bytes (265 expanded) in 3 messages zebedee(232/210): wrote 20969 bytes (30499 expanded) in 247 messages =item B =begin JM-comment This is the "generator" for the Diffie-Hellman key exchange and is a hexadecimal string. The default value is "2". I recommend that you don't mess with this unless you know what you are doing. =end JM-comment これは、Diffie-Hellmanキー交換の"generator"で、16進数の文字列で指定する。 デフォルトは"2"である。 なんのことかわからなければ、 下手にいじらない方がいいだろう。 =item B =begin JM-comment If this key is specified its value is a command string that will be executed in order to generate a private key. The command should write a single line of hexadecimal digits to F. This line must be a string of at least 10 hexadecimal digits. =end JM-comment このキーワードが指定されると、 この値(コマンド文字列)が秘密鍵を生成するために使用される。 そのコマンドは標準出力に1行の16進数を出力しなくてはならない。 この行は少くとも10桁の16進数であること。 =item B =begin JM-comment This is an integer between 0 and 2 inclusive that determines how strong the private key generation in B should be. The default is 2 (the strongest) and you should generally not change this unless connection set-up performance becomes unacceptable. =end JM-comment これは0と2の間の整数で、Bで使用する秘密鍵生成の強度を決定する。 デフォルトは2(最強)である。接続時のパフォーマンスが耐えがたい場合以外には、 一般的にはこれを変更しないほうがよい。 =begin JM-comment Briefly, on UNIX-like systems the level-2 key generation mechanism uses C or C, if either of these devices is available, to obtain good pseudo-random data based on the state of the running kernel. If no random-data device is available or the level is set to 1 then data from the current contents of the C file-system, if there is one, will be used otherwise at level 0 only data from the current process will be used. =end JM-comment 簡単に言って、UNXI系のシステムではレベル2のキー生成のメカニズムは、 可能であれば C を使用する。 しかしながら、あまりにも多くの要求を連続的にこのデバイスに対して行うと、 カーネルが必要な"エントロピー"をかき集める間、 プロセスがブロックされる可能性がある(それが数秒になることもある)。 Cが使用できない場合や レベルが1にセットされた場合は、 Cファイルシステムの現在の内容が(もしあれば)使用される。 レベル0では現在のプロセスにある情報だけが使用される。 =begin JM-comment On Windows systems there is currently no distinction between different key generation strength levels and this keyword is effectively ignored. =end JM-comment Windows上のシステムでは、現在のところ、 キー生成強度のレベルごとの違いはなく、 このキーワードは実際には無視される。 =item B (コマンドラインでは B<-k>) =begin JM-comment This is an integer specifying the maximum key length (in bits) for the Blowfish encryption. It should be a multiple of 4 between 4 and 576. The key length used will be the minimum of the client's and server's values (subject to any setting of B>). The default valuse is 128. As a special case setting this value to 0 will turn off key negotiation and encryption. =end JM-comment これは、Blowfish暗号化のキーのビット長の最大値の整数である。 この値は4から576の間の4の倍数でなければならない。 使用されるキー長はクライアントの値とサーバの値の最小値になる。 (B>参照) デフォルトは128である。 特別なケースとして、この値が0に設定されると、 キーのネゴシエーションと暗号化は無効にされる。 =item B =begin JM-comment If the value of this parameter is non-zero it causes the client to request the re-use of a previously established shared secret key for deriving session keys for subsequent connections. This means that on the first connection between a B client and server the full key exchange dialogue will take place to establish a shared secret key. On subsequent connections, until the key expires, the same secret key will be reused to generate a new session key. Once the key expires a new key exchange will automatically be performed when necessary. =end JM-comment このパラメータの値が0以外に設定されると、これ以降の接続において、 クライアントはセッションキーの導出のために、以前設定されたshared secret keyを 再利用するように要求する。 つまりBのクライアントとサーバは、 最初の接続においてのみキー交換の対話を全て行なう。 それ以降の接続では、キーの有効期限が切れるまでは、同じsecret keyが再利用され、 このキーからsession keyが導出される。 キーの有効期限が切れると、自動的に新しいキーの交換が行なわれる。 =begin JM-comment This keyword specifies how long a shared secret key is valid before it must be renegotiated. This does not affect connections that have already been established, only new connections. =end JM-comment そして、このキーワードが、shared secret keyが有効な期間を指定する。 これは、既に接続された接続には影響しないで、新しい接続だけに影響する。 =begin JM-comment The value is in seconds and must be less than or equal to 65535, which is a little over 18 hours. By default it is set to 3600 seconds (one hour). Setting this value to zero effectively disables the use of reusable keys and a full negotiation of a shared key will be performed for each connection --- assuming that both client and server also generate a new private key each time. This will impact performance and is recommended only if you have a very high paranoia level! =end JM-comment このキーワードの値の単位は秒であり、65535(約18時間)以下でなければならない。 デフォルトは3600秒(1時間)である。 このキーワードの値を0に設定すると、キーの再利用は行なわれなくなり、 接続の度に、完全なshared keyの交換手続きが行なわれる。 つまり、クライアントもサーバも毎回秘密鍵を新しく生成するとみなす。 ただし、この方法はパフォーマンスに多大な影響があるので、 偏執狂的に高度な安全性を必要とする場合以外には勧められない。 =item B =begin JM-comment If supplied this specified the minimum acceptable key length to be used by client or server. If a client requests a lower level of a server the server will reply with this minimum. If a server replies with a lower level to a client then the client will terminate the connection. The default value is zero. =end JM-comment これは、クライアントまたはサーバで許容される最小のキー長を指定する。 クライアントがサーバのレベルより小さい値を要求すると、 サーバはここで指定した最小値を返答する。 サーバがクライアントの最小値より下のレベルを返答すると、 クライアントは接続を終了する。 デフォルトは0である。 =item B =begin JM-comment The value of this key is a hexadecimal string specifying the modulus value for the Diffie-Hellman key exchange. Don't alter this unless you are both paranoid and know what you are doing. =end JM-comment このキーワードの値は、Diffie-Hellmanキー交換の剰余値を表す16進数の文字列である。 これが何かわかる人で数学オタクの人以外はいじっちゃだめ。 =begin JM-comment The default modulus is the 1024-bit prime: =end JM-comment デフォルトの値は下記の1024ビットの素数である。 f488fd584e49dbcd 20b49de49107366b 336c380d451d0f7c 88b31c7c5b2d8ef6 f3c923c043f0a55b 188d8ebb558cb85d 38d334fd7c175743 a31d186cde33212c b52aff3ce1b12940 18118d7c84a70a72 d686c40319c80729 7aca950cd9969fab d00a509b0246d308 3d66a45d419f9c7c bd894b221926baab a25ec355e92f78c7 =begin JM-comment This was taken from the file F in Peter Gutman's B. The comment in this code says that the value was among those "generated by Colin Plumb for SKIP". It further says that "these values were chosen as representative well-known public values to allay fears of possible trapdoors in self-generated values. The generation method and actual values can be checked against the SKIP standards document." =end JM-comment これは Peter Gutman の B の中の F というファイルから とられた。 そこには、この値が "generated by Colin Plumb for SKIP"だとコメントがある。 それから "these values were chosen as representative well-known public values to allay fears of possible trapdoors in self-generated values. The generation method and actual values can be checked against the SKIP standards document." だとさ。 =item B =begin JM-comment By default B will generate a new private key each time one is required. If, however, you wish to use a fixed key then it can be specified as a string of hexadecimal digits. You will definitely need to do this if you wish to use the L feature. Note that the key must be at least 10 digits long. =end JM-comment デフォルトでは、Bはセッションごとに新しい秘密鍵を生成する。 しかし、もしあなたが毎回同じキーを使いたい場合は、 16進数の文字列としてこれを指定すればいい。 もし公開鍵暗号による認証(L)を使用したい場合は、 必ずこれを設定しなくてはいけない。 キーが少くとも10桁は必要なことに注意すること。 =back =head3 様々なキーワード(Miscellaneous Keywords) =begin JM-comment The following keywords apply equally to clients and servers: =end JM-comment 以下のキーワードはクライアントにもサーバにも等しく適用される。 =over 4 =item B =begin JM-comment This names a file that contains a set of identities that will be checked before allowing a connection to be completed. This is described further in the description of L. You may specify only one identity file. If this keyword appears multiple times only the last value will be used. If a B> of zero has been agreed then no identity checking will be performed. =end JM-comment これは、接続を許可する前にチェックするアイデンティティを複数記述したファイルの名称である。 これについてはLで詳しく述べる。 このファイルはひとつしか指定できない。もし複数出現したら、 最後の値が使用される。 もし、B>が0であることに (クライアントとサーバが)同意した場合は、アイデンティティのチェックは行なわれない。 =item B (コマンドラインでは B<-D>) =begin JM-comment This is a boolean indicating that B should run in "debug" mode. In this case a server (or client running in B> mode) only accepts and handles a single connection at a time and does so "inline" without creating another process or thread. This is useful when running the program under the control of a debugger. It is false by default. The command-line option B<-D> is equivalent to setting this to B. =end JM-comment これはBが "debug" モードで動作するかを指定する真偽値である。 "debug" モードではサーバは (B>モードのクライアント)は 一度に一つの接続しか受け付けない。 そして、別プロセスや別スレッドを生成することなく "inline" で動作する。 これはデバッガ上でプログラムを動かす時に便利である。 デフォルトはfalseである。コマンドラインオプションの B<-D> は これを B に設定するのと同じである。 =begin JM-comment Note that this setting will not work correctly in UDP mode, so don't bother trying it! =end JM-comment 注:この設定は、UDPモードでは正しく動作しないので、試さないほうがいい。 =item B (コマンドラインでは B<-d>) =begin JM-comment This is a boolean indicating whether the process should detach itself from the controlling terminal and run in the background (in UNIX terms, to run as a "daemon"). This is valid for both client and server and is true by default. The command-line option B<-d> is equivalent to setting this to B. =end JM-comment これはプロセスが制御端末から自分自身を切離してバックグラウントで (UNIX用語ではデーモンとして)動作するかどうか指定する真偽値である。 これはクライアントでもサーバでも有効であり、 デフォルトは B である。コマンドラインオプションのB<-d>は これを B に設定するのと同じである。 =begin JM-comment Note that this does not always seem to work from an interactive command prompt under Windows systems. The symptom is that output to the console window will stop and interrupt signals will be ignored but the console prompt will not be issued until B terminates. In order to work around this you can use the "start" command as in the following example: =end JM-comment 注:Windowsのコマンドプロンプトではこれがうまく動作しないこともあるようだ。 その徴候は、コンソールウインドウへの出力が止まり割込みのsignalが無視されるが、 コンソールのプロンプトがBが終了するまで表示されないことだ。 これを回避するには、以下のように "start" コマンドを使用すればよい。 DOS> start zebedee -f server.zbd =begin JM-comment This will start B in a new console session from which it will then detach. You may see a console window appear briefly before it detaches but B should be running in the background when it disappears. =end JM-comment これはBを新しいコンソールセッションで起動し、そこから切り離す。 切り離す前に一瞬だけチラリとそのコンソールが見えるが、それが消えても Bはバックグラウンドで動作している。 =item B =begin JM-comment This specifies the name of another configuration file to read and parse at this point before continuing with the remainder of the file. It might be used, for example, where a private key is stored in a separate, more tightly protected file. There is a limit of 5 levels deep of include processing (counting the initial configuration file as level 1). This avoids unintentional recursion. =end JM-comment これは別の設定ファイルの名前を指定する。 そのファイルはこのファイルの残りを処理する前、 この時点で処理される。 例えば、秘密鍵をもっときっちりガードしたファイルに分離して保存した場合に、 そのファイルを取り込むために使用される。 includeは5レベルの深さまでに限定される(最初のファイルをレベル1として)。 これはうっかり無限ループを作らないためである。 =item B =begin JM-comment This specifies the size, in bytes, of the buffer B will use to read data from applications. The actual size of buffer used will be the minimum of the client's and server's values. =end JM-comment これは、 B がアプリケーションからデータを読むために使用するバッファの長さ(バイト単位)を指定する。 実際に使用されるバッファの長さはサーバの値とクライアントの値の最小値になる。 =begin JM-comment By default B attempts to read data from the client or server programs at each end of the tunnel in chunks of 8192 bytes. There may be occasions when you want to decrease this if, for example, you have a highly interactive application and the response seems sluggish because you end up waiting for large data transfers. You can reduce the buffer size to one byte, but unless you are trying to debug misbehaviour or have time to waste I don't recommend it! Conversely, you may increase the buffer size up to a maximum of 16383 bytes to attempt to gain the most from data compression where large blocks of data are being transferred. Note that the B value does not affect how much memory is allocated by B, only the size of data chunks read. =end JM-comment デフォルトでは、Bはトンネルの両端で サーバプログラム、クライアントプログラムから8192バイト単位で読み出す。 例えば、すごく対話的なアプリケーションがあって、 大きなデータ転送を待つためにひどいレスポンスだったりした時など、 これを小さくしたいこともあるだろう。 バッファサイズは1バイトまで縮めることができるが、 おかしな動きをデバッグしようとしているのか時間を無駄にしたいのでなければ、 これはお勧めできない。 逆に、大量のデータの転送があって、 圧縮をめいっぱい効かせたい場合は、16383バイトまで大きくしてもよい。 注:B は B が使用するメモリ量には関係ない。 一度に読みこむデータのかたまりのサイズだけに影響する。 =begin JM-comment When running in UDP mode this buffer size will also affect the maximum size of any datagram that can be handled. Datagrams larger than the current buffer size will be fragmented, which will likely cause whatever application is consuming them to fail. Datagrams larger than 16383 bytes can not be handled at all. =end JM-comment UDPモードでは、バッファサイズは扱えるデータグラムの最大長にも影響する。 現在のバッファサイズより大きなデータグラムは分断され、 それを受信するアプリケーションが落ちることになりがちだ。 16383バイト以上のデータグラムは扱うことができない。 =item B =begin JM-comment The specifies a string that will be logged at verbosity level 1 when it is encountered in the configuration file. =end JM-comment verbosity level が1ならば、設定ファイルのこの部分を処理した時に、 このメッセージがログに記録される。 =item B (コマンドラインでは B<-n>) =begin JM-comment This is the name of the program that is to be used in messages rather than the executable file name. Under Windows it is also the name of any service to be installed or removed. =end JM-comment これは、実行ファイルのファイル名の代わりに、 メッセージの中で使われるプログラム名称になる。 Windows環境では、インストールあるいは削除されるサービスの名前としても用いられる。 =item B (command-line B<-o>) =begin JM-comment This is the name of the file to which messages will be written. If it is not specified then messages are written to F. =end JM-comment これはメッセージが出力されるファイルの名前である。 もし省略されるとメッセージは標準エラーに出力される。 =begin JM-comment Two special "file names" are also recognised as valid values. If the name is B the all messages will be turned off. If the name is B then messages will be written to the host system log. On Windows systems this is the system application event log. Elsewhere messages are written to the B service. =end JM-comment 2つの特殊なファイル名も正しい名前として認識される。 もし、名称がBだと、全てのメッセージ出力は止められる。 Bだと、メッセージはホストのシステムログに出力される。 Windowsシステムでは、アプリケーションイベントログを意味する。 他のシステムでは、メッセージはB サービスに出力される。 =item B =begin JM-comment #2.0 This is the port on which the B server will listen for tunnel connections. The default is 11965 (0x2EBD) when running in TCP mode and 11230 (0x2BDE) in UDP mode. The keyword causes a server to listen on this port and a client to attempt to connect to this port on the server system. =end JM-comment これは、B サーバが接続を待ち受けるポートである。 デフォルトはTCPモードでは11965 (0x2EBD)、UDPモードでは11230(0x2BDE)である。 サーバでこれを指定すると、サーバはこのポートでlistenする。 クライアントでこれを指定すると、クライアントは サーバのこの番号のポートに接続することになる。 =item B (コマンドラインでは B<-t>) =begin JM-comment This is a boolean value indicating whether log messages should contain a time-stamp. The default is not to do so. The command-line option B<-t> is equivalent to setting this to B. =end JM-comment これは、ログメッセージにタイムスタンプを含めるかどうかを示す真偽値である。 コマンドラインオプションの B<-t> はこれをBに設定するのと同じである。 =item B (コマンドラインでは B<-u>) =begin JM-comment By default B handles connection-oriented TCP/IP traffic. If this keyword is set true handles UDP/IP connectionless traffic instead. =end JM-comment デフォルトではBは、コネクションベースのTCP/IPの通信を扱う。 もし、このキーワードが指定されると、かわりにコネクションレスのUDP/IPの通信を扱う。 =begin JM-comment The tunnel between B clients and servers still uses a TCP/IP connection. A separate connection is established for each different originating UDP network endpoint. Because UDP is connectionless there is no easy way to tell when the data traffic has been completed. For this reason the B connection must be timed out after a period of inactivity. This period is controlled by the B> value. =end JM-comment この場合でも、Bのクライアントとサーバ間のトンネルはTCP/IP接続を使用する。 UDPの宛先ごとに別々の接続が使用される。 UDPはコネクションレスなので、通信が完了したことを簡単に知ることはできない。 この理由で、Bの接続は一定の時間通信が無い場合にタイムアウトする必要がある。 この時間はB>の値で制御される。 =begin JM-comment If more data subsequently arrives from a source the tunnel for which has been timed out, the connection must be re-established. For this reason the performance in UDP mode may appear poor, depending on the nature of the application using it. Altering the B> value may improve this by minimizing connection setup times and changing the B> value may also help. =end JM-comment すでにタイムアウトしてしまったトンネルに向けたデータが到着した場合、 接続を再確立する必要がある。 このために、アプリケーションの特性によっては、 UDPモードのパフォーマンスがよくないように見えることもある。 B>の値を変更して、 接続のセットアップの時間を最小にすれば、パフォーマンスを向上させることができる。 B> の値を変更することも同様に役に立つ。 =begin JM-comment The command-line B<-u> option is equivalent to setting this to B. =end JM-comment コマンドラインオプションのB<-u>は、この値をBに設定するのと同じである。 =item B =begin JM-comment By default, UDP-mode tunnels will shut down after 300 seconds of inactivty. This value can be changed by using this keyword to specify the timeout in seconds. It must be no greater than 65535. Setting it to zero is legal but may result in no data being transferred! =end JM-comment デフォルトでは、UDPモードのトンネルは、300秒通信が無いと閉じられる。 このキーワードでその時間を変更できる(単位は秒)。 この値は65535より大きくなってはいけない。 これを0にすると一切通信が行なわれない(そういう設定もできるけど…)。 =item B (コマンドラインでは B<-v>) =begin JM-comment This is an integer specifying the level of message logging with 0 being just error messages and 5 giving excruciating detail of the message traffic. The default (and generally most useful level) is 1. =end JM-comment これは、ログするメッセージのレベルを示す整数値である。 0だとエラーメッセージだけ、 5にするとメッセージトラフィックの非常に細かいディテールまで含める。 デフォルトは1であり、通常はそれが最も使いやすい。 =begin JM-comment Messages are written to F (unless redirected using the B<-o> command-line option or B> keyword). The general form of messages is something like: =end JM-comment メッセージは F に出力される(コマンドラインオプションのB<-o>か B> キーワードでリダイレクトされない限り) 一般的なメッセージはこんな感じである: zebedee(54/119): Listening on local port 1172 =begin JM-comment The numbers in brackets represent the process and thread identifiers of the code logging the message. All error messages are logged at level 0 and are preceded by the word C, as follows: =end JM-comment カッコの中の数字はメッセージを出力したプロセスとスレッドのIDを表している。 全てのエラーメッセージはレベル0でもログが取られ、 以下の様に、先頭が C という単語から始まる。 zebedee(54/119): ERROR: failed to connect to localhost:11965 =begin JM-comment Messages are indented according to the level at which they are logged. =end JM-comment メッセージはログが取られたレベルに従ってインデントされる。 =back =head3 その他のオプション(Other Options) =begin JM-comment There are a few command-line options that have no equivalent in the configuration file. These are described below. =end JM-comment 設定ファイルに対応するものを持たないコマンドオプション がいくつかあるので、それについてここで説明する。 =over 4 =item -p =begin JM-comment This causes B to generate a private key value and to write it to standard output in a form that can be used in a configuration file (see B>). For example: =end JM-comment このオプションで B は秘密鍵の値を標準出力に出力する。 この出力は設定ファイルでそのまま使用できる形式である。 例えば、 privatekey "c480bd48f707c69dec54c9e7b6e22dd04cac659e" の様な形である。 =item -P =begin JM-comment This causes B to generate a public "identity" suitable for use by the L feature. The result is written to standard output. For example: =end JM-comment このオプションで B はL で 使用できるパブリックアイデンティティを生成する。結果は標準出力に書かれる。 例えば、 ef8153a0e392df005f67321ca2f0ace5bb8c5a1f myhostname の様な形である。 =begin JM-comment This option must either be specified with a configuration file that contains a private key value or must be used in conjunction with B<-p> to generate private and public keys simultaneously. =end JM-comment このオプションは秘密鍵を含む設定と共に指定するか、 B<-p> と共に用いて秘密鍵と公開鍵を両方同時に生成しなくてはいけない。 =item -h =begin JM-comment This option causes the remaining command-line arguments to be treated as the names of files. Each file is read in 8192 byte chunks and the SHA hash is calculated. If no arguments are specified or the argument is "C<->" then the standard input is read and the hash of that is calculated. For example: =end JM-comment このオプションは以降の引数をファイル名とみなす。 そして、それぞれのファイルは8192バイトのかたまりとして読みこまれ、 SHAハッシュが計算される。 引数がない場合や引数が"C<->"であった場合は標準入力のハッシュが計算される。 例えば、 $ zebedee -h /etc/passwd bb1e734aeffd2111417761f5938dea3b53759598 /etc/passwd $ zebedee -h < /etc/passwd bb1e734aeffd2111417761f5938dea3b53759598 - の様な形である。 =item -H =begin JM-comment This is similar to the B<-h> option except that each argument is treated as a literal string and the SHA hash of the string is calculated and printed: =end JM-comment こちらはB<-h>と似ているが、引数が文字列として扱われ、 その文字列のSHAハッシュが計算され表示される。 $ zebedee -H hello world ac62a630ca850b4ea07eda664eaecf9480843152 hello 86bf25ecb8a40b40b885c097c683b6e236fc8085 world =item -S (Windows only) =begin JM-comment On Windows systems B can be installed and run as a "service" --- an independently running process that is started automatically at system boot time. B can be installed as a service by specifying the B parameter with the name of a configuration file, for example: =end JM-comment Windowsシステムでは B を サービス(ブート時に自動的に起動され独立して動くプロセス)として インストールすることもできる。 BはBパラメータと設定ファイルの名前を指定することで サービスとしてインストールされる。例えば、 zebedee -Sinstall=c:\zebedee\service.zbd の様な形である。 =begin JM-comment You should always specify the full path to the configuration file. This will be read at service start-up and must contain all the parameters required for the service to run. =end JM-comment 常に、設定ファイルのフルパスを指定しなければならない。 このファイルはスタートアップ時に読みこまれ、 サービスが動作するために必要なパラメータを全て含んでいなければならない。 =begin JM-comment By default, the name of the installed service will be taken from the name of the program file, and hence is usually B, but you can change this by using the B<-n> option: =end JM-comment デフォルトでは、 インストールされるサービスの名前はプログラムファイルの名前から取られる。 従って通常はBになる。 しかし、B<-n>オプションを使用して変更することもできる。 zebedee -n "Zebedee Client Service" -Sinstall=c:\zebedee\clientsvc.zbd =begin JM-comment Once the service has been installed it will be automatically started the next time that the system reboots. Alternatively you can start it manually using the Service Control Panel (under Windows NT). =end JM-comment 一旦、サービスがインストールされると、次のシステム再起動から自動的に起動される。 もしくは(Windows NTの場合)サービスコントロールパネルで手動起動することもできる。 =begin JM-comment To remove the service specify first stop it and then use the B parameter to the B<-S> option, along with any necessary service name using B<-n>. For example: =end JM-comment サービスを削除するにはまずサービスを終了してから、B<-S>オプションと B パラメータを使う。 そして、もし必要ならばB<-n>オプションでサービスの名称を指定する。 例えば、 zebedee -n "Zebedee Client Service" -Sremove の様な形である。 =begin JM-comment There is one further valid parameter to the B<-S> option and this is B. This is used internally by B to invoke the service start-up code and should not be used directly. =end JM-comment B<-S>のパラメータは他に B がある。これは内部で B の サービススタートアップコードを起動するために使うもので、 ユーザが直接使用してはならない。 =item -x =begin JM-comment This option can be used to set those configuration parameters that do not have any other direct command-line equivalent. It takes a string as an argument and this string is treated as if it were a line read from a configuration files (including comments but without "\" line continuation). So, for example: =end JM-comment コマンドラインで指定できない設定ファイルのパラメータを 指定するために、このオプションを使用することもできる。 これに文字列の引数をつけると、 それがあたかも設定ファイルの1行であるかのように処理される。 コメントは認識されるが、"\"の継続行は使用できない。 例えば、 zebedee -x " server true # It's a server!" =begin JM-comment is a rather perverse way of achieving the same effect as: =end JM-comment というまわりくどいやりかたでも次のコマンド zebedee -s と同じ効果を得ることができる。 =back =head2 Identity Checking =begin JM-comment By default B just establishes an encrypted channel between two points. While you know that the data is protected from snooping "on the wire" there is no guarantee that the channel ends up where you think it does. It is open to "man-in-the-middle" attacks. If you are concerned primarily with using data compression or protecting against casual "network sniffing" then you may be happy with this situation. If, however, you want more assurance that your connection is not being redirected then B provides some basic facilities for doing so. =end JM-comment B はデフォルトでは、2点間に暗号化チャネルを生成するに過ぎない。 ご承知の通り、データは "on the wire (通信線上)" での盗聴からは守られるが、 あなたが想定している相手に接続されているか否かは保証されない。 これは、"man-in-the-middle (第三者による横取り)" アタックに対しては無防備である。 もし、あなたがデータの圧縮と、盗聴から守ることを第一に心配しているなら、 あなたはこの条件に満足するだろう。 しかし、あなたの通信が第三者に横取りされていないことに対する保証を求めるなら、 B はそれを行うための便宜を提供する。 =begin JM-comment If the same modulus, generator and private key are used they will always generate the same public value for use in the Diffie-Hellman key exchange protocol. If you use a fixed private key (specified using the B>) keyword in a configuration file) then B can generate a key "fingerprint" by hashing together the modulus, generator and public key value. This is done using the B<-P> option, for example, if the file F contains the following value: =end JM-comment もし、同一の素数と原始根と秘密鍵が用いられるなら、それらは Diffie-Hellman の鍵交換プロトコルのために、常に同じ公開鍵を生成するだろう。 もし、あなたが(設定ファイルのB>キーワードにて設定された) 固定された秘密鍵を用いるなら、 B は素数と原始根と秘密鍵の値の全てをハッシュして "fingerprint (指紋)" を生成することができる。 これは、B<-P> オプションにより行われる。 例えば、server.key ファイルが次の値 privatekey "1e34d6769502bae1087c18d2e8c8776e4a17ddaf" であるとき、 =begin JM-comment then the command =end JM-comment 次のコマンド $ zebedee -P -f server.key > server.id を実行すると、 =begin JM-comment will generate output something like this: =end JM-comment このような出力 135f04050961d37553731250d5c6f7495f088b32 myhostname が得られる。 =begin JM-comment The initial string of hexadecimal digits is the "fingerprint". Anything else on the line is a comment describing the owner of the identity. By default it is the name of the host on which the identity string was generated. =end JM-comment この最初の16進数が "fingerprint (指紋)" である。 行中の他の文字列は、このアイデンティティの所有者を表すコメントである。 デフォルトでは、これはアイデンティティが生成されたマシンのホスト名である。 =begin JM-comment If the B> keyword is specified in a configuration file then its value is the name of a file containing "fingerprint" lines. If the identity of the system at the other end of the connection does not match any of those in the file then the connection will be closed. =end JM-comment 設定ファイルにおいて B> キーワードが設定された場合、その値は "fingerprint (指紋)" 行を記述したファイルのファイル名である。 もし、接続 先のアイデンティティがファイル中のいかなる値とも一致しない場合、 接続は切断される。 =head2 その他のセキュリティ関連の注記(Notes on Other Security Issues) =over 4 =item Message Integrity =begin JM-comment In keeping with the desire to keep the protocol overhead as low as possible, B does not perform any data integrity validation on the transmitted data stream. It is, therefore, possible for an attacker to alter data packets in transit. The encryption used should make it extremely hard for someone to transform them arbitrarily at will --- for example turning "C" into "C" --- but do not depend on B to protect your application from the effects of being fed random data! =end JM-comment プロトコルのオーバーヘッドを可能な限り小さくするために、 B は伝送されたデータの正しさに対する確認は何も行っていない。 そのため、アタッカーは途中でデータパケットを改変することができる。 しかし、暗号の使用はデータを任意に変換することを極めて困難にしているのではないか (例えば、"C"を"C"に書き換えられるかい?) 。 しかし、B はランダムなデータが送られたことによる影響から アプリケーションを守ることは行わない。 =item Replay and Insertion Attacks =begin JM-comment One possible attack on many networked systems is that of capturing data streams that have a known effect --- for example, a B session during which an administrator was known to be performing certain "dangerous" actions --- and then replaying it at some later time. This does not require cracking the encrypted data stream itself, merely knowing that the same network packets sent to a server will elicit the same response. =end JM-comment 多くのネットワークシステムにおいて有り得る攻撃の一つは データのキャプチャリングであり、良く知られた効果を及ぼす (例えば、管理者の B セッションにはある種の"危険な"操作が伴い、 その操作を後に繰り返されたらどうなるか)。 これを行うには、暗号化されたデータストリームを改変する必要は無いが、 サーバに送られた同じネットワークパケットは、同じレスポンスを引き出すだろう。 =begin JM-comment #2.0 When B is operating in "anonymous" mode the risk of such an attack being successful is low because different keys will be generated and used for every session. However, if the L features are used the keys will be fixed and replay could be a possibility. B protects against this by generating a unique session key for each connection. Following that, the final part of the connection setup also involves a challenge-response exchange that verifies that the system at the other end of the connection really knows the shared secret key and is not just parrotting back previously recorded data. =end JM-comment B が "anonymous" モードで動作しているとき、 セッション毎に異なる鍵が生成されるため、 このようなアタックが成功する危険は非常に小さい。 しかし、Lの機能が使われているときには 鍵は固定されているので、再生は実際に可能性がある。 Bは、一つ一つの接続毎にユニークなセッションキーを生成することで、 この問題に対処している。 この方法では、接続のセットアップの最後に、チャレンジ-レスポンスの交換が行なわれ、 相手側のシステムがshared secret keyを保持しており、 以前に記録されたデータをオウム返ししているわけではないことが、 確認される。 =begin JM-comment In addition, B uses Blowfish encryption in "cipher feedback" mode which means that decryption of any part of the data depends upon successful decryption of all the data packets that have gone before it. The challenge-response exchange "salts" the data-stream so even if the protocol being tunnelled is determined a "known plain-text" attack is made more difficult. =end JM-comment 加えて、B は Blowfish 暗号法を "cipher feedback" モードで用いており、 データのあらゆる部分の複号は、 それ以前の全てのデータパケットの複号が成功しているかどうかに依存する。 チャレンジ・レスポンスはデータストリームの "salts" を交換するので、 トンネル化されたプロトコルに "known plain-text" アタック(辞書攻撃)を加えるのは より困難になる。 =item Key Generation =begin JM-comment A poorly-chosen key can compromise even the strongest encryption mechanism. When generating keys B attempts to gather as much hard-to-guess state data as possible and then "stir" it using the SHA hashing algorithm. On modern UNIX systems this generation process should give pretty good keys. =end JM-comment 良くない鍵の使用は、最強の暗号化メカニズムをも汚すことができる。 鍵を生成するとき、B は可能な限り推測が困難なデータをかき集めて、 それを SHA ハッシュアルゴリズムにより "ステア (かき混ぜる)" する。 =begin JM-comment On Windows the available state data is somewhat more predictable, particularly if an attacker has access to the system. Having said that, it should be quite acceptable for most purposes. The comments in the code explain this in more detail if you are interested. =end JM-comment Windowsの場合、アタッカーが既にシステムにアクセスしていれば、 取得可能なあらゆるデータは予測することができる。 しかし既に言及したように、 ほとんどの用途においてこれは許容できるだろう。 興味があるならば、プログラム中のコメントに詳細が説明されているので、 参照されたい。 =begin JM-comment If you are unhappy with the key generation mechanisms then you should call out to an external key generation program using the B> option in a configuration file. Suggestions for improving the built-in capabilities will also be gratefully received! =end JM-comment もし、鍵の生成メカニズムに不満があるなら、 設定ファイル中のB> オプションを用いて、 外部の鍵生成プログラムを呼べば良い。 組み込まれている性能を改善する提案は大歓迎だ! =back =head1 トラブルシューティング(TROUBLESHOOTING) =begin JM-comment Although B should work "out of the box" you might encounter some problems. These are most likely during connection setup --- once that has been accomplished the data transfer generally goes smoothly. The eaisest way to see what is happening during the setup process is to use the B<-v> option. You will usually want to combine this with the B<-d> and B<-D> options to stop B from the terminal and to force it to handle only a single connection at a time. So, for example, you might use the following command to start up a server: =end JM-comment B は「箱から出してすぐそのまま」動くべきだが、あなたはトラブル にあうかもしれない。ほとんどのトラブルは接続の確立時に起こる (接続さえうまくいけば、データ転送はスムーズにいくことが多い)。 (接続の)セットアップの手順に何が起こっているか簡単に見るにはB<-v>オプションを 使えばよい。B<-d> B<-D> もいっしょに使って、Bを端末から終了でき るようにして、一度に一つの接続しか処理しないようにしたほうがい いかもしれない。だから、こんな感じになるだろう。 zebedee -dD -v 3 -s =begin JM-comment Setting the logging level to 3 should show you the main exchanges during connection setup. If you believe there is a problem after this then levels 4 and 5 will show you what message traffic is being exchanged. =end JM-comment ロギングレベルを3に設定することで、 接続のセットアップの主なやりとりを見ることができる。 問題がその後に起きてると確信が持てるならば、 レベルを4か5にすれば、 (接続時だけでなく)実際の通信で何がやりとりされているかも見ることができる。 =head1 EXAMPLES =begin JM-comment In the B distribution there are a number of example configuration files. The following sections describe how they can be used as well as how to use B to tunnel some specific protocols. (訳注:distributionという言葉をディストリビューションと訳すと、時節柄 Redhatやdebianなどのlinuxのディストリビューションと混同されそうなので パッケージと訳します) =end JM-comment B のパッケージには、たくさんのサンプルの設定ファイルが含まれている。 ここでは、それらの使用法と B を 特定のいくつかのプロトコルで使用する具体的な方法を述べる。 =head2 サーバ設定の例(Example Server Configuration) =begin JM-comment There is an example server configuration file (F) shipped with the B distribution. This shows most of the common options. =end JM-comment Bのパッケージに含まれる F という設定ファイルがある。 これにはよく使われるほとんどのオプションの設定例がある。 # # Sample Zebedee server configuration file # # This shows the use of many, but not all, of the configuration file # options available for use by a server. # verbosity 2 # Slightly more than basic messages server true # Yes, it's a server! detached true # Run detached from terminal udpmode false # Are we operating in UDP mode? # Uncomment the following line to log messages to a file # # logfile './server.log' # # Or to log to the system logging facility uncomment this: # # logfile SYSLOG # Uncomment the following line if you want to use a fixed private # key stored in a static file. The file should contain a line of # the form "privatekey hexadecimal-key-string" # # include './server.key' keygenlevel 2 # Generate maximum strength private keys # To validate the identity of clients uncomment the following # line: # # checkidfile './clients.id' # Set up allowed redirection ports. # These should be pretty safe -- but it's not a good idea # to open up all ports. redirect "telnet ftp" # Basic services redirect 5900-5999 # VNC traffic redirect 6000-6010 # X Window System redirect "daytime chargen" # Ports useful for testing targethost localhost # Redirection is to the local machine compression zlib:9 # Allow maximum zlib compression keylength 256 # Allow keys up to 256 bits keylifetime 36000 # Shared keys last 10 hours maxbufsize 16383 # Allow maximum possible buffer size =begin JM-comment To test the identity checking facilities you can uncomment the B> line and then use one of the supplied F or F files on the client side. =end JM-comment 認証の機能をテストするためには、 B>の行をコメントアウトし、 パッケージに含まれるFかFというファイルをクライアント側で使用すればよい。 =head2 VNCの使用例(Use with VNC) =begin JM-comment One of the reasons behind writing B was to use it over dial-up lines with VNC. VNC is a free system to provide remote display capabilities using a "remote frame-buffer" concept. You can use it to display Windows desktops remotely or, with an "Xvnc" server to access an "X desktop" from any VNC client machine, or even a Java-enabled browser! See http://www.uk.research.att.com/vnc/ for more details. =end JM-comment Bを作った理由の一つとして、ダイアルアップでVNCを使うということがある。 VNCは「リモートフレームバッファコンセプト」を使い、 リモートディスプレイを提供するフリーのシステムである。 Windowsのデスクトップを離れた所に表示することもできるし、 "Xvnc"サーバを使って X のデスクトップを VNCクライアントマシンから操作することもできるし、 Javaを使えるブラウザーの中から操作することもできる。 詳しくはhttp://www.uk.research.att.com/vnc/を参照のこと。 =begin JM-comment The supplied sample server configuration file F is configured to allow redirection of ports 5900-5999 which will allow tunnelling of VNC sessions. This file can be used on both UNIX and Windows but note that on Windows you must set the "AllowLoopback" flag in the registry in order for tunnelling to work. Saving the following snippet (without any leading spaces) in file a and then importing it into B will do the trick: =end JM-comment 提供されるサーバの設定例であるF は 5900-5999 ポートを リダイレクトしてVNCセッションをトンネリングする。 このファイルはUNIXでもWindowsでも使用できるが、 Windowsで使うためには、レジストリの"AllowLoopback"フラグを セットする必要があるので注意。 以下の断片を(先頭のスペースを取り除いてから)ファイルに保存して B に読ませれば、そのトリックを実行する。 REGEDIT4 [HKEY_LOCAL_MACHINE\SOFTWARE\ORL\WinVNC3] "AllowLoopback"=dword:00000001 [HKEY_LOCAL_MACHINE\SOFTWARE\ORL\WinVNC3\Default] =begin JM-comment You will find a file with these contents in the B distribution by the name F. Having set these registry entries then the file F can be used to invoke a VNC viewer tunnelled to the host named on the command line. By default it will tunnel to ther server on port 5900 (the WinVNC default) but you can override this by specifying that on the command line too. Here are the contents of the file F: =end JM-comment この内容は B パッケージの中の F にも含まれている。 このレジストリを設定すれば、コマンドラインで与えられたホストにトンネリングされたVNC ビューワを F で起動することができる。 デフォルトでは、サーバの(WinVNCのデフォルトである)5900ポートにトンネルするが、 コマンドラインで指定して上書きすることもできる。 以下に F の内容を示す。 # # Zebedee configuration file to start up a tunnelled VNC session # # Usage: zebedee -f vncviewer.zbd remote-host[:vnc-port] # verbosity 1 # Basic messages only server false # It's a client detached true # Detach from terminal message "Starting VNC viewer on localhost:99" # On Windows systems you might use the following: command '"c:\Program Files\ORL\VNC\vncviewer.exe" localhost:99' # On UNIX systems you might use the following: # command 'vncviewer localhost:99' targetport 5900 # Remote VNC server on port 5900 unless overridden # by a value specified on the command-line clientport 5999 # Local connection on 5999 -- i.e. localhost:99 compression 6 # Request normal Zlib compression =begin JM-comment So using this file as follows: =end JM-comment 以下のようにこのファイルを使用すると、 zebedee -f vncviewer.zbd somehost:5901 =begin JM-comment will start a VNC viewer tunnelled to the VNC server on I port 5901 (the server you would usually refer to in VNC-parlance as "B"). The viewer is connected to the local port 5999. =end JM-comment Iの5901番ポートのVNCサーバにトンネルしたVNCビューワを起動する。 ビューワはローカルホストの5999番ポートに接続する。 =begin JM-comment VNC also supports a Java viewer. If the server is running on port 59xx then the viewer can be downloaded via port 58xx. However, it appears that the Java viewer communicates the main VNC port number to the client. So, to tunnel traffic when using the Java viewer you must make sure that the local and remote ports use the same numbers. So, for example, to tunnel traffic to a VNC server using port 5901 you should do something like: =end JM-comment VNCはJavaのビューワもサポートしている。 もしサーバがポート59xxで動作していたら、 ビューワを58xxからダウンロードすることができる。 しかしながら、 どうもJavaビューワはクライアントへのメインのVNCポート番号で通信しているようだ。 そのため、Javaビューワでこれをトンネルするには、 ローカルとリモートで同じポート番号を使う必要がある。 そのため、例えば、5901番のポートを使っているVNCサーバへのトラフィックを トンネルするには、次のようにする。 zebedee 5801,5901:remotehost:5801,5901 =begin JM-comment This will be problematic if you already have a VNC server running locally on port 5901, but you can usually arrange local and remote VNC servers so that there is no clash. =end JM-comment もしローカルマシンでも5901番ポートを使ったVNCサーバが動いていると、 これはうまくいかない。 しかし、ポートが衝突しないように両者を調整することは可能である。 =begin JM-comment There is one last point worth mentioning. If you are using compression with VNC it is worth experimenting a bit with the VNC protocol encoding. I have found that "raw" encoding often compresses best and sometimes gives better performance with B over slow links. But, as they say, your mileage may vary! =end JM-comment もうひとつだけ言っておくことがある。 VNCをデータ圧縮とともに使おうとしているなら、 VNCのprotocol encodingに関して実験したほうがよい。 私は、"raw" encoding が圧縮の効果が高く、 遅い回線上ではよりよいパフォーマンスを示すことを発見した。 しかし、あなたの場合は違う結果となるかもしれない。 =head2 X Window Systemの使用例(Use with the X Window System) =begin JM-comment The X Window System uses ports in the range 6000 onwards. =end JM-comment X Window Systemは6000番以上のポートを使う。 =begin JM-comment Let's assume that your local machine called B is running an X server on port 6000. This would be the port normally used by the display known as B. You now want to send a secure B session back to your local display from a machine called B. To do this you might run the following command on B: =end JM-comment B というローカルマシンのポート6000でX サーバが動作しているとする。 これは通常、B というディスプレイで使われているポートである。 そして、Bという(リモート)マシンから、 ローカルのディスプレイに安全な B のセッションを送り返したいものとする。 これを行なうには、以下のコマンドを B で実行する。 zebedee -r 6000 -s =begin JM-comment Then on B you could run: =end JM-comment そして、B では zebedee 6001:xlocal:6000 を実行する。 =begin JM-comment This means that if the B environment variable on B is set to C then X traffic will end up on B. So, for example, to send a secured B session from B to B you would run a command like this on B: =end JM-comment このことは、B上で、環境変数のBがCに設定されていれば、 XのトラフィックはBに到着することを意味する。 そのため、例えばBを安全にBから送ろうとするなら、 B上で次のコマンドを実行する必要がある。 xterm -display localhost:1 =begin JM-comment Note that in order for this to work correctly you must also add an entry for B to the access control list for the X server on B. You can do this by running the following command on B: =end JM-comment これが正しく動作するためには、 BのXサーバのアクセスコントロールリストにBのエントリーを 追加しなくてはならない。 これを行うには次のコマンドを実行する。 xhost +localhost =head2 HTTPの通信を安全にする(Securing HTTP traffic) =begin JM-comment B can be used to secure or just compress all traffic to and from a Web server. So, for example, if a Web server is running on the machine B on port 80 and it is also running a B server then the command: =end JM-comment Bクライアントを"multi-use"モードで動作させることで、 全てのWebサーバへの通信を安全にすることができる。 もし、Webサーバが B のポート80で動作しており、 そのサーバマシンで B サーバも動作しているとしたら、 次のコマンドがローカルマシンの8000番ポート経由のトンネルを設定する。 zebedee 8000:webhost:80 will set up a tunnel via port 8000 on the client host. Now any URLs that previously were addressed via B, for example: http://webhost/private/index.html =begin JM-comment can now be accessed securely as follows: =end JM-comment は、この状態では次のURLで安全にアクセスできる。 http://localhost:8000/private/index.html =begin JM-comment You could redirect all HTTP traffic via the secure tunnel by setting "C" as your proxy. Be careful, however, only to set this as the proxy for HTTP connections --- other protocols (including Secure HTTP) should be directed elsewhere. It is also possible to configure most browsers to use different proxies for different domains and so secure connections selectively. Consult your browser's documentation for details on how to do this. =end JM-comment "C"をあなたのプロキシーとして設定することで、 全てのHTTPのトラフィックを安全なトンネル経由にすることもできる。 しかし、注意すべきことは、HTTPのプロキシー設定以外にこの設定をしてはいけない。 Secure HTTPを含む他のプロトコルは他の方法でリダイレクトする必要がある。 ほとんどのブラウザは違うドメインに違うプロキシーを割りあてる設定も可能である。 そのため、必要なものだけ選んでガードすることもできる。 これを行なう方法についてはブラウザのマニュアルを参照されたし。 =head2 FTPの通信を安全にする(Securing FTP traffic) =begin JM-comment It is possible to protect the FTP control connection (over which the username and password are sent) for many FTP servers using B "out of the box" by following the instructions below. It is also possible to protect the control connection for other servers and even "passive-mode" data connections by using B in conjunction with the B script in the B distribution. =end JM-comment 以下の手段で、 Bを使い多くのFTPサーバへのFTPコントロールコネクション (ユーザ名とパスワードが送られるコネクション)を守ることができる。 さらに、Bパッケージに含まれる B スクリプトによって、 パッシブモードのデータコネクションさえも守ることができる。 =begin JM-comment The simplest approach, which works with some FTP servers, is to run the B server as follows: =end JM-comment FTPサーバを扱う最も単純な方法は、以下のように B を起動することだ。 zebedee -s -r ftp ftpserverhost =begin JM-comment Note that even if you are running B on the same machine as the FTP server you should explictly name it on the command line (or using the B> keyword). Do not refer to it as B. On the client system you could then run B as follows to set up a tunnel via port 10000: =end JM-comment FTPサーバと同じマシンで B を動作させていても、コマンドラインで 明示的にホスト名を指定する必要がある(または B>キーワードを使用)。それを Bとして参照してはいけない。クライアントシステムでは Bを次のように起動して、ポート10000番経由のマルチユーストンネル を構築する。 zebedee 10000:ftpserverhost:ftp =begin JM-comment To connect to the FTP server you would then use a command like: =end JM-comment FTPサーバに接続するには、次のようなコマンドを使用する。 ftp clienthost 10000 =begin JM-comment Again, use the local client host name not, B. If your FTP client does not support specifying the port on the command line, as is the case with the standard Windows FTP client program, you may be able to use the command "C" from within the program. If you are not running an FTP server on the client machine you could also try running B as: =end JM-comment くどいようだが、B でなくローカルクライアントのホスト名を使うこと。 もし、windowsの標準FTPクライアントのように、 あなたのFTPクライアントがコマンドラインでポートを指定できない時は、 プログラムの中で(FTPセッションの中で) "C" というコマンドを使うことができる。 もし、クライアントマシンでFTPサーバが立ち上がっていなければ、 B をこのように起動してもよい。 zebedee ftp:ftpserverhost:ftp =begin JM-comment and then just invoking the FTP client program as: =end JM-comment これだとFTPクライアントプログラムは次のように起動できる。 ftp clienthost =begin JM-comment The approach just described will work for FTP servers that do not check that the FTP control and data connections appear to come from the same source. However, some servers such as the widely-used B are more strict about this --- for good security reasons. If you can apparently establish a connection to the server but directory listing and file retrievals fail or hang then it is likely that your server is one of the strict ones. =end JM-comment FTPのコントロールコネクションとデータコネクションが同じ所から来ているか どうかチェックするFTPサーバがあるが、そういうサーバに対しては上記の手法は うまくいかない。B のようなメジャーなFTPサーバはこの点に ついて厳しくチェックを入れる(セキュリティ面からは望ましいことだが…)。 もし、サーバへの接続は明らかにうまくいくのに、 ファイルのリストや読み出しで失敗したりハングアップするなら、 そのサーバがここを厳しくチェックするタイプだった、ということだ。 =begin JM-comment To help overcome this problem there is an "FTP gateway" script in the B distribution called B. This is a program, written using the freely-available B scripting language (see http://www.scriptics.com) that intercepts FTP requests and re-writes them so that a server is shielded from the presence of B. You should run this on the same system as the B server. Assuming that the FTP server is also running on the same system you can just run this as: =end JM-comment この問題を克服するのを助けるために、B というFTPゲートウェイの スクリプトが B パッケージには含まれている。 このプログラムはフリーに入手可能であるTclスクリプティング言語 (http://www.scriptics.com参照)で書かれていて、 FTPのリクエストを中継して再送信し、サーバからB の存在を隠す。 これは B サーバと同じマシンで走らせる必要がある。 FTPサーバも同じマシンで動いているなら、単にこう起動すればよい。 tclsh ftpgw.tcl =begin JM-comment This will start the gateway listening on port 2121. Obviously, in real usage you will probably want to start this in the background. You then start the B server as: =end JM-comment これでゲートウェイはポート2121で待ち受ける。明らかに、実際の使用ではこれ をバックグラウンドで起動したいだろう。それから、Bサーバを zebedee -s -r 2121 として起動する。 =begin JM-comment Note that in this case you do not have to specify the local host name, although you may do so if you wish. On the client side you can now run: =end JM-comment このケースではローカルホスト名を指定する必要はない (したければしてもかまわないが)。 クライアント側ではこうする。 zebedee 2121:ftpserverhost:2121 =begin JM-comment followed by: =end JM-comment それからこうする。 ftp clienthost 2121 =begin JM-comment You must still, however, use the client host name here. =end JM-comment こちらでは、この場合でもクライアントホスト名を使う。 =begin JM-comment This configuration will allow you to tunnel the FTP control connection but will not affect any data connections. Using B it is, however, also possible to secure the data channels provided that your FTP client can operate in "passive" mode. Examples of clients that can do this are Netscape Navigator and the Windows program WS_FTP. =end JM-comment この設定では、FTPのコントロールコネクションはトンネルされるが、 データコネクションには一切影響を与えない。 もし、あなたのFTPクライアントがパッシブモードをサポートしていれば、 B でデータチャンネルも安全にすることができる。 Netscape Navigator や Windows用のWS_FTPなどはそれをサポートしている。 =begin JM-comment To secure passive-mode data connections you must choose a range of ports on the server that will be used for data connections. In this example we will use 30000 to 30100. You then start B with the B<-p> option to specify this port range: =end JM-comment パッシブモードのデータコネクションを安全にするためには、 まずデータコネクションに使うポート番号の範囲を選ばなくてはいけない。 この例では。30000から30100番を使うものとする。 まず、B を 起動する時に、このポート範囲を指定するために、 B<-p>オプションを使用する。 tclsh ftpgw.tcl -p 30000-30100 =begin JM-comment The B server would then be started as: =end JM-comment Bサーバはこのように起動する。 zebedee -s -r 2121,30000-30100 =begin JM-comment and the client as =end JM-comment クライアントはこうだ。 zebedee 2121,30000-30100:ftpserverhost:2121,30000-30100 =begin JM-comment To access the server with both control and data connections secured using Netscape you would then supply a URL of the form: =end JM-comment Netscapeを使ってコントロールコネクションとデータコネクションを 両方安全にアクセスするには、このようなURLを入力する。 ftp://username@clienthost:2121/ =begin JM-comment where I is your user-name on the FTP server host. =end JM-comment ここでIはFTPサーバでのユーザ名である。 =head1 CREDITS AND LEGALITIES The following information can also be found in the file F in the B distribution. Copyright (c) 1999, 2000 by Neil Winton. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. A copy of the GNU General Public License can be found in the file F. You may obtain the latest copy of B, including full source code from http://www.winton.org.uk/zebedee/ and other enquiries about B can be e-mailed to the author at zebedee@winton.org.uk B would not have been possible without the use of a large amount of freely-available software to do all the really hard stuff. I gratefully acknowledge the contributions made by the authors of the following software packages. B uses the "Blowfish" encryption algorithm devised by Bruce Schneier. For more information on Blowfish see http://www.counterpane.com/blowfish.html . The implementation used is by Eric Young and is covered by the following copyright: Copyright (C) 1995-1997 Eric Young (eay@mincom.oz.au) All rights reserved. This package is an Blowfish implementation written by Eric Young (eay@mincom.oz.au). This library is free for commercial and non-commercial use as long as the following conditions are aheared to. The following conditions apply to all code found in this distribution. Copyright remains Eric Young's, and as such any Copyright notices in the code are not to be removed. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by Eric Young (eay@mincom.oz.au) THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The license and distribution terms for any publically available version or derivative of this code cannot be changed. i.e. this code cannot simply be copied and put under another distrubution license [including the GNU Public License.] The reason behind this being stated in this direct manner is past experience in code simply being copied and the attribution removed from it and then being distributed as part of other packages. This implementation was a non-trivial and unpaid effort. B uses the B compression library by Jean-loup Gailly and Mark Adler. It is covered by the following copyright notice: (C) 1995-1998 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. Jean-loup Gailly Mark Adler jloup@gzip.org madler@alumni.caltech.edu B may use the B compression library by Julian Seward which is covered by the following licence: This program, "bzip2" and associated library "libbzip2", are copyright (C) 1996-1999 Julian R Seward. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 3. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 4. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Julian Seward, Cambridge, UK. jseward@acm.org bzip2/libbzip2 version 0.9.5 of 24 May 1999 By default B is built using an aribtrary precision integer arithmetic library derived from the sources to C which in turn derived this from the B sources. The copyright is as follows: huge-number.c: arbitrary precision integer library from Python sources This has nothing to do with cryptography. Copyright (C) 1998 Paul Sheer This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. This file was taken from the Python source for `long' type integers. I have changed it to compile independently of the Python source, and added the optimisation that GNU C can use 31 bit digits instead of Python's 15 bit. You can download the original from www.python.org. This file bears little resemblance to the original though - paul Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, The Netherlands. All Rights Reserved Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation, and that the names of Stichting Mathematisch Centrum or CWI or Corporation for National Research Initiatives or CNRI not be used in advertising or publicity pertaining to distribution of the software without specific, written prior permission. While CWI is the initial source for this software, a modified version is made available by the Corporation for National Research Initiatives (CNRI) at the Internet address ftp://ftp.python.org. STICHTING MATHEMATISCH CENTRUM AND CNRI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM OR CNRI BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. B uses the Secure Hash Algorith (SHA) the code for which was derived from Uwe Hollerbach's SHA module for B. The code contains the following statement: NIST Secure Hash Algorithm heavily modified by Uwe Hollerbach from Peter C. Gutmann's implementation as found in Applied Cryptography by Bruce Schneier This code is in the public domain Under Windows, B uses an implementation of the F function covered by the following copyright: Copyright (c) 1987, 1993, 1994 The Regents of the University of California. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. All advertising materials mentioning features or use of this software must display the following acknowledgement: This product includes software developed by the University of California, Berkeley and its contributors. 4. Neither the name of the University nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. =head2 Thanks Special thanks go to those people who have taken the trouble to give me feedback and suggestions for improvement! $Id: zebedee20.pod,v 1.1.1.1 2000/10/09 07:11:40 tnaka Exp $