asppp.cf ファイルを編集することによってセキュリティを設定し、リンクの各部分が、パスワード認証プロトコル (PAP) またはチャレンジハンドシェーク認証プロトコル (CHAP) に応答するかどうかを指定できます。PAP と CHAP については、「PPP のセキュリティ」で説明してます。asppp.cf ファイルを編集するには、一連のキーワードを追加します。この節では、認証システムはリンクまたはチャレンジを開始するシステムであり、これは多くの場合サーバーです。対等システムはリンクの反対側にあるシステムであり、これは多くの場合クライアントです。
追加するキーワードは、require_authentication と will_do_authentication です。認証システムつまりサーバーは通常、認証を要求し、対等システムつまりクライアントは通常、認証を行います。
表 23-4 認証システムのキーワードと関連の文字列|
require_authentication chap |
|
|---|---|
|
chap_peer_secret |
|
|
chap_peer_name |
表 23-5 対等システムのキーワードと関連の文字列
|
will_do_authentication chap |
|
|---|---|
|
chap_secret |
|
|
chap_name |
サーバー上のスーパーユーザーになります。
リンク上の各マシンについて require_authentication キーワードを追加して、PAP セキュリティと CHAP セキュリティのどちらを使用するかを指定します。
will_do_authentication キーワードを使用して、リンク上で PAP セキュリティまたは CHAP セキュリティを使用する各リモートホストについて、リモートホストの /etc/asppp.cf ファイルにエントリを追加します。
例 23-1 は、PAP と CHAP の認証を必要とするサーバー mojave 用の asppp.cf ファイルを示しています。対等システムは、nomada (PAP) と nomadb (CHAP) です。
ifconfig ipdptp0 plumb mojave nomada up
ifconfig ipdptp1 plumb mojave nomanb up
path
peer_system_name tamerlane
require_authentication pap #tells nomada that mojave
#requires pap authentication
pap_peer_id desert
pap_peer_password oasis
path
peer_system_name lawrence
require_authentication chap #tells nomadb that mojave
#requires chap authentication
chap_peer_name another¥sdesert
chap_peer_secret secret¥soasis¥swith¥007bell
|
例 23-2 に示された mojave のリモートホスト nomada は、PAP と CHAP の両方を認証しようしています。
ifconfig ipdptp0 plumb tamerlane mojave up
path
interface ipdptp0
peer_system_name mojave
will_do_authentication chap pap #nomada tells mojave
#that it will do chap and
#pap authentication
pap_id desert
pap_password oasis
chap_name desert¥srain
chap_secret %$#@7&*(+|`P'12
|
例 23-3 に示された mojave のリモートホスト nomadb は、CHAP を認証しようしています。
ifconfig ipdptp0 plumb nomadb mojave private up
path
interface ipdptp0
peer_system_name mojave
will_do_authentication chap #nomadb tells mojave that it
#will do chap authentication
chap_name another¥sdesert
chap_secret secret¥soasis¥swith¥007bell
|
通常、CHAP と PAP の両方が構成ファイルに組み込まれていて、サーバーが認証を要求し、リモートホストが認証を行うのが、理想的な形です。ただし、この順序は逆も可能なためリモートホストの方が認証を要求することも可能です。CHAP シークレットは安全な手段で送付する必要があります。これは一般的に手動での解放を含みます。