LINUX MODEM SHARING MINI-HOWTO <author>Friedemann Baitinger, <htmlurl url="mailto:baiti@herrenberg.netsurf.de" name="baiti@herrenberg.netsurf.de"> <date>V1.01, 11/02/97 <trans>伊佐冶 哲, <htmlurl url="mailto:isaji@mxu.meshnet.or.jp" name="isaji@mxu.meshnet.or.jp"> <tdate>27 Dec 1997 <abstract> <!-- _1. Introduction_ This mini-HOWTO describes how to setup a Linux system in order to share a modem attached to this system with other systems over a TCP/IP network. --> このmini-HOWTOでは、TCP/IPネットワーク経由の他のシステムからモデムを共有する ためのLinux設定方法について解説しています。 </abstract> <toc> <sect>更新履歴 <p> <!-- V1.01, 11/02/97 source now in HTML format, added a reference on where to get 'cu', also added a reference on where to get mserver. '-s' parameter added to 'cu' example. V1.00, 06/12/97 Initial release --> <verb> V1.01, 11/02/97 HTMLフォーマットのソース。'cu'をどこで入手できるか そのリファレンスを追加。またmserverの入手先も追加。 'cu'に'-s'パラメータを付けた例。 V1.00, 06/12/97 初期リリース </verb> <sect>サーバ側の設定(Linux) <!-- _2. The Server Side_ --> <p> <!-- It is assumed that the server is a Linux system with either: --> サーバにはLinuxを使い、以下のことを前提として話しを進めます。 <enum> <item><!-- a modem attached to a /dev/ttyS_x_ device -->モデムは<tt>/dev/ttyS</tt><it/x/デバイスを使います。 <item><!-- an 'isdn4linux'-emulated modem mapped to a /dev/ttyI_x_ device --><tt/isdn4linux/ <tt>/dev/ttyI</tt><it/x/デバイス (<em/訳注:/<tt/isdn4linux/のサイトはftp://ftp.franken.de/pub/isdn4linux/など です。ISDN回線でないと「回線が使用中です。しばらくしてからやり直して みて下さい」(Windows95側)というメッセージが出るのですが、うまくいった方が おられたらぜひ教えて下さい) </enum> <!-- The easiest setup I can think of uses a five lines perl script to implement a 'modem demon': --> もっとも簡単なセットアップとして<tt/modem demon/を起動するための 5行perlスクリプトを使います。 <p> $ cat /usr/sbin/modemd <code> #!/usr/bin/perl select((select(STDOUT), $| = 1)[$[]); select((select(STDIN), $| = 1)[$[]); exec 'cu -s 115200 -l /dev/ttyS1'; die '$0: Cant exec cu: $!\n'; </code> <!-- The modem demon is started by the INETD process if a client connects to the appropriate port as described below. The 'modemd simply connects the socket handle with STDIN and STDOUT of the 'cu' command and lets 'cu' handle the actual modem device. In case you don't have 'cu' on your system, please install the 'UUCP' package, 'cu' is usually part of 'UUCP'. --> クライアントが適当なポートに接続している場合、モデムデーモン(modemd)は <tt/inetd/プロセスによって開始されます。以下述べるように モデムデーモンは単に'<tt/cu/'コマンドの標準入力/出力をソケットハンドルに接続 して、'<tt/cu/'ハンドルを実際のモデムデバイスとするだけです。'<tt/cu/'コマン ドがシステムにない場合は,UUCPパッケージをインストールして下さい。 'cu'は UUCPの一部です(<em/訳注:/cu は他のシステムをコールアップ(Call up) するコマンドです)。 <!-- The existence of the modem demon must be made known to the INETD process by updating its configuration file, usually /etc/inetd.conf like: --> モデムデーモンの存在は設定ファイルをアップデートすることでinetdプロセス として認識されます。設定ファイルは通常<tt>/etc/inetd/conf</tt>に <code> # # modem daemon # modem stream tcp nowait root /usr/sbin/tcpd /usr/sbin/modemd /dev/ttyS1 </code> と書かれます(<em/訳注:/<tt>/dev/ttyS1</tt>は適当なデバイスに変更します)。 <!-- In order to make this work, an entry to '/etc/services' needs to be added like: --> これを動作させるために,<tt>/etc/services</tt>にエントリーさせます。 <code> modem 2006/tcp modemd </code> <!-- This associates a symbolic name with an explicit port, 2006 in the example. The portnumber could be any number not already assigned to an existing service. After these changes have been made, a signal must be sent to the inetd process in order to let inetd re-read and process its configuration file: --> この例では、シンボリック名はポート番号2006に対応しています。 ポート番号は使用されていないサービスのものが使えます。変更後,inetdプロセス にシグナルを送ります。これはinetdで設定を再度読み込み、プロセスを再開させる ために必要です。 <verb> $ ps |grep inetd 194 ? S 0:00 /usr/sbin/inetd kill -HUP 194 </verb> <!-- Now the server side is ready to accept requests from clients. The correct function can be verified by: --> これでサーバ側はクライアントからの要求を受ける準備ができました。 正しく機能しているかは以下のようにして確認できます。 <verb> $ telnet localhost modem Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. </verb> <!-- You are now connected to the modem. You can now issue 'AT' command in order to verify the setup: --> さあ,モデムにつながりました。セットアップを確認するために'AT'コマンドを うちこんでみます。 <verb> atz atz OK ati1 ati1 Linux ISDN OK ^] telnet>quit $ </verb> <!-- Instead of using the Perl script as a modem server, there is also a program named 'mserver' available on ftp://ftp.innet.be/pub/staff/carl/ . In case it is not there anymore, you may want to use 'archie' or any other search engine in order to locate the mserver archive. I haven't had the opportunity yet to install and use mserver. --> モデムサーバでPerlスクリプトを使う代わりに,mserverというプログラムも あります。<tt>ftp://ftp.innet.be/pub/staff/carl/</tt>から入手できます。 うまくみつからない時はarchieコマンドで検索するか適当なサーチエンジン を使ってmserverの在処を探して下さい。著者はまだmserverをインストールして 使っていないのでこれ以上はコメントできません(訳注:mserverはネットワーク に繋がっている他のホストからモデムを使うためのネットワークモデムサーバ プログラムです。モデムデバイスはリモートホストがサーバに接続された時だけ オープンされます。詳しくはmserverパッケージのREADMEに書かれています)。 <!-- 訳注:http://www.ueda.info.waseda.ac.jp/~toyama/network/multi.html --> <sect>クライアント側の設定(Windows) <!-- _3. The Client Side_ --> <p> <!-- At this time, only Windows client setups are described here. On the client PC, a COM-port redirector for TCP/IP is required. The best program for this purpose I have found is 'DialOut/IP' from 'Tactical Software' for Windows 3.1 and Windows 95. (The Windows 3.1 version can be used under Windows NT for 16-bit applications only. A 32-bit version for Windows NT is due late summer 1997.) --> ここではWindowsクライアントのセットアップについて解説します。 クライアントのPCにはTCP/IP用のCOMポートリディレクター(<tt/com-port redirector/ )が必要です。これにかなうプログラムはwindows 3.1とwindows 95用の 'tactical software'の「dialout/ip」です(windows 3.1版は16-bitアプリケーションです。また windows nt用の32-bitプログラムは1997年の夏に公開されます)。 (<em/訳注:/以下のサイトから入手できます。 <url url="http://www.tactical-sw.com" name="http://www.tactical-sw.com">。 <!-- <url url="http://www.tactical-sw.com/html/dialout_ip.html"> --> windowsnt用のものはすでに公開されています。 評価版windows95 <tt/dlip95.exe/で約1,133kbありました) <!-- dialout/ip presents the shared modem on a new virtual com port that it adds to windows. this virtual com port can be used by windows programs as if the shared modem is directly connected. most client applications (including windows 95 dial-up networking) accept this and work as if there were a real com port and modem, with the general exception being fax applications or any others that need access to uart control lines. dialout/ip can be configured to provide telnet protocol processing, but that feature applies to certain modem pool products and not to the linux setup described in this file. note that, despite its name, dialout/ip can be used also by applications that wait for incoming calls. --> dialout/ipは新しい仮想comポート上の共有モデムを表示するものです(<em/訳注:/ windowsの「モデムのプロパティ」からみると新しいcomポートが見えます)。 仮想comポートは,windowsプログラムからは,共有モデムが直接つながっているか のようにみえます。多くのクライアントプログラム(windows 95 ダイアルネット ワークなどもそうです)はこれを認識し実際のcomポートとモデムがあるか のように動作できるのですが、一般的にfaxアプリケーションなどuart(<em/訳注:/ <tt/universal asynchronous receiver transmitter/の略) コントロールラインを使うものは除きます。dialout/ipはtelnetプロトコルを 供給するように設定することもできますが,この特性はモデム をプール(pool)する製品にのみ 当てはまり、この文書で述べるlinux設定には当てはまりません。 またその名前にもかかわらずDialOut/IPは呼び出される側としても使えるアプリケー ションです。 <p> <!-- On www.tactical-sw.com there is a page for downloading a fully functional evaluation version that times out in 1-2 weeks. Installation and configuration is handled by a setup program, with installation details in the README.TXT file. When you run DialOut/IP, you enter the IP address and port number of the shared modem. --> <tt/www.tactical-sw.com/サイト上では 1〜2週間の期限付きの評価版をダウンロードするページがあります。 インストールと設定はSETUPプログラムで行えます(<em/訳注:/ダウンロードした ファイル(.exe)は自己解凍してインストールを開始します)。またインストールの詳細に ついてはREADME.TXTファイルに書かれています。 DialOut/IPを実行したときは,IPアドレスと共有モデムのポート番号を入力します。 <!-- DialOut/IP is a commercial product that is licensed on a per-modem basis, that is, the price depends on the number of modems that you are sharing. The license states that you can install the software on any number of PC's that access the shared modems. --> DialOut/IPは商用の製品でモデムあたりにライセンスが適用されます。つまり 値段は共有しているモデムの数に依存しています。ライセンスには 「共有モデムにアクセスするPCマシンの任意の台数にインストールできる」 と書かれています。 __ <sect>セキュリティについて <!-- _4. Security Considerations_ --> <p> <!-- If you have only one modem for all your hosts in your local area network, there is probably no reason to worry about security here. However, if any one or more of the hosts in your LAN are connected to the internet by other means than using the modem we have just setup as a modem server, then security considerations are required, otherwise anybody can do a 'telnet your_host modem' and dial out long distance or even international calls at his will. --> もしLANであなたのホストに一台のモデムがあるだけなら、おそらくセキュリティに ついて心配することはないでしょう。しかしインターネットに接続されたLANで一台 以上のモデム(モデムサーバとして設定したもの)がある場合はセキュリティについて よく考えなくてはなりません。だれでも<tt/telnet (あなたのホスト名) modem/ と実行して長距離にダイアルしたり、その気になれば国際電話をかけられて しまうからです。 <!-- I suggest to install and configure tcp-wrappers in order to protect the modem sevrer against unauthorized access. --> 許可されていないアクセスからモデムサーバを保護するために <em/tcp-wrappers/のインストールをお奨めします(<em/訳注:/ <itemize> <item>アーカイブ: <itemize> <item>ftp.iij.ad.jp:/pub/netman/security/tcp_wrapper.tar.gz </itemize> <item>参考: <itemize> <item><it/UNIX MAGAZINE/ 1996.6 P66 <item><it/Linux Japan/ Vol.5 p.12 <item><url url="http://www.phys.s.u-tokyo.ac.jp/people/sirahasi/security.html"> </itemize> </itemize> __ <sect>実例 <!-- _5. Examples_ --> <p> <!-- I am using the setup as described in (2) and (3) to run Quicken on my Windows 95 ThinkPad and do homebanking with the modem attached to my Linux machine. The 'modem' in my case is not even a real modem, it is an emulated modem on an ISDN-So card. Quicken just sees a COM port, it doesn't know that the device attached to the COM port is actually at the other end of my Ethernet LAN, nor does it know that it is not a standard analog modem but an ISDN device which happens to understand 'AT' commands. --> 2章と3章で述べたセットアップによってWindows 95 ThinkPad上でQuicken(<em/訳注:/ 財務、金融関係に使うソフトです。不動産や定期預金などの資産,住宅ローンなどの 負債勘定も管理できます。 <htmlurl url="http://www.xaxon-net.or.jp/gifs/reviews/11_19007.htm" name="http://www.xaxon-net.or.jp/gifs/reviews/"> )を実行して、Linuxマシンに接続されたモデムでホームバンク(homebank)に使っていま す。著者の場合のモデムは本物のモデムではありません。これはISDN-Soカード上の エミュレートされたモデムなのです。COMポートに接続されているデバイスは、 実際のデバイスがイーサネットLANのどの場所にあるかは認識していません。 また標準アナログモデムかどうかも認識していませんが、ISDNデバイスはATコマンド を認識できるのです。 </article>