RP-PPPoEの接続設定をするには,adsl-setupコマンドを使う。adsl-setupコマンドを実行すると,幾つかの項目が尋ねられ,質問に答えるだけで設定ファイルが作成される。adsl-setupコマンドは,次のようにrootユーザーとして実行する。
$ su Password: rootユーザーのパスワードを入力する # /usr/sbin/adsl-setup |
まずはじめに,次のように接続時に使うユーザー名が問われる。ここでは,ADSLを契約したプロバイダから発行されたアカウントのユーザー名を入力する。多くのADSLプロバイダでは,「ユーザー名@プロバイダ名」といった形式になっている。
Welcome to the Roaring Penguin ADSL client setup.First, I will run some checks on your system to make sure the PPPoE client is installed properly... Looks good!Now, please enter some information: USER NAME >>> Enter your PPPoE user name (default bxxxnxnx@sympatico.ca):ユーザー名を入力する |
次に,ADSL接続に使うネットワークカードのデバイス名を指定する。いい換えれば,ADSLモデムに直結されているネットワークカードのデバイス名である。今回は,Fig.2に示したように1枚のネットワークカードを装着して接続するので,通常は1枚目のネットワークカードのデバイス名である「eth0」と入力すればよいだろう。
INTERFACE >>> Enter the Ethernet interface connected to the ADSL modem For Solaris, this is likely to be something like /dev/hme0. For Linux, it will be ethn, where 'n' is a number. (default eth0):eth0と入力する |
次に,何秒間接続したら切断するのかを秒数で指定する。サーバを公開するのであれば,一度接続したら切断されないようにするのが一般的だろう。このような場合には,「no」と入力しておけばよい。
Do you want the link to come up on demand, or stay up continuously? If you want it to come up on demand, enter the idle time in seconds after which the link should be dropped.If you want the link to stay up permanently, enter 'no' (two letters, lower-case.) NOTE: Demand-activated links do not interact well with dynamic IP addresses.You may have some problems with demand-activated links. >>> Enter the demand value (default no): noと入力する |
次にDNSサーバのアドレスを指定する。これはADSLプロバイダから指定されたDNSサーバのIPアドレスを入力することになる。もしADSLプロバイダがDNSサーバを指定せずに,自動設定としているのであれば,「server」と入力する(DNSサーバのIPアドレスを指定すべきなのか自動設定にすべきなのかはプロバイダにより異なる)。「server」と入力した場合には,接続時にADSLプロバイダが用意したPPPoEサーバから得られたDNSサーバのIPアドレスが使われるように設定される。
DNS Please enter the IP address of your ISP's primary DNS server. If your ISP claims that 'the server will provide DNS addresses', enter 'server' (all lower-case) here. If you just press enter, I will assume you know what you are doing and not modify your DNS setup. >>> Enter the DNS information here:DNSのIPアドレスまたはserverと入力する |
ここで「server」ではなく,DNSサーバのIPアドレスを入力した場合には,さらに次のようにセカンダリDNSのIPアドレスも問われる。
Please enter the IP address of your ISP's secondary DNS server. If you just press enter, I will assume there is only one DNS server. >>> Enter the secondary DNS server address here: セカンダリDNSのIPアドレスを入力する |
|
次に,接続に用いるパスワードを指定する。ここではADSLプロバイダから発行されたアカウントのパスワードを入力することになる。
PASSWORD >>> Please enter your PPPoE password:ADSLプロバイダから発行されたパスワードを入力する >>> Please re-enter your PPPoE password: 確認のため,同じものをもう一度入力する |
続いて,ファイアウォールのタイプを設定する。RP-PPPoEでは,ファイアウォールのタイプを次のなかから1つ選択することになっている(Table 2)。
Table 2■ファイアウォールの種類
|
Table 2に示したように,NONE,STANDALONE,MASQUERADEのいずれかから1つを選択することになる。Fig.2に示したようにサーバーを公開するのであれば,全内容を公開する設定である“NONE”を指定する。NONEを指定するとセキュリティ対策は何もされず,すべてのパケット(データ)の送受信ができる。
Please choose the firewall rules to use. Note that these rules are very basic. You are strongly encouraged to use a more sophisticated firewall setup; however, these will provide basic security. If you are running any servers on your machine, you must choose 'NONE' and set up firewalling yourself. Otherwise, the firewall rules will deny access to all standard servers like Web, e-mail, ftp, etc. If you are using SSH, the rules will block outgoing SSH connections which allocate a privileged source port. The firewall choices are: 0 - NONE: This script will not set any firewall rules. You are responsible for ensuring the security of your machine. You are STRONGLY recommended to use some kind of firewall rules. 1 - STANDALONE: Appropriate for a basic stand-alone web-surfing workstation 2 - MASQUERADE: Appropriate for a machine acting as an Internet gateway for a LAN >>> Choose a type of firewall (0-2): NONEと入力する |
|
|
最後に下記のように,いままで入力した内容が表示されるので,設定に問題がなければ[y]キーを押す
** Summary of what you entered ** Ethernet Interface: eth0 User name: foo@example.co.jp Activate-on-demand: No DNS addresses: Supplied by ISP's server Firewalling: NONE >>> Accept these settings and adjust configuration files (y/n)? yキーを押す |
以上で設定は完了だ。次のようなメッセージが表示され,/etc/pppディレクトリに,pppoe.confファイル,pap-secretsファイル,chap-secretsファイルの3つのファイルが作られる。
Adjusting /etc/ppp/pppoe.conf Adjusting /etc/ppp/pap-secrets and /etc/ppp/chap-secrets (But first backing it up to /etc/ppp/pap-secrets-bak) (But first backing it up to /etc/ppp/chap-secrets-bak) Congratulations, it should be all set up! Type 'adsl-start' to bring up your ADSL link and 'adsl-stop' to bring it down. Type 'adsl-status' to see the link status. |
pppoe.confファイルがPPPoEの設定ファイル,pap-secretsファイルとchap-secretsファイルがADSL接続のためのユーザー名とパスワードなどが記載されたファイルとなる。あとで設定変更したいのであれば,もういちどadsl-setupコマンドを実行するか,もしくはエディタでこれらのファイルを編集すればよい。
4/12 |