例 11-4 は、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
例 11-5 に示された 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 |
例 11-6 に示された 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 シークレットは安全な手段で送付する必要があります。そのためには、一般に CHAP シークレットは先方に手で渡すことが必要です。