■ RP-PPPoEを使用してADSLに接続する ADSLのインターネットサービスプロパイダとの接続には、PPPoE(Point to Point Protocol over Ethernet)というプロトコルを用いるのが一般的です。 このPPPoEを用いた接続のためのクライアントソフトウェアのひとつに、RP-PPPoE(Roaring Penguin's PPPoE Software)があります。 配布元は http://www.roaringpenguin.com/pppoe/ です。 【事前準備】   LinuxカーネルにEthernetカードを認識させておく必要があります。また、/etc/sysconfig/networkにてデフォルトゲートウェイ(GATEWAY)およびデフォルトゲートウェイのデバイス(GATEWAYDEV)の変数は削除しておいてください。 削除後は /etc/rc.d/init.d/network の restartが必要です。 【インストール】 rp-pppoe(3.0-1)をインストールします。 pppパッケージ(2.3.7以降)がインストールされている必要があります。 # rpm -q ppp ppp-2.3.11-2 # rpm -ivh rp-pppoe-3.0-1.i386.rpm 【設定】 設定にはコマンドラインベースのadsl-setupコマンドを用いる方法と、GUIベースの設定ツールを用いる方法があります。 ここでは adsl-setupコマンドを用いる方法を記述します。 この方法の場合、設定内容は主に/etc/ppp/pppoe.confに保存されることになります。 ここでは次の設定値を用いて説明します。 プロバイダ接続ユーザ名 : test@turbolinux.co.jp パスワード : hogehoge モデム接続インターフェース : eth1 DNS設定 : 行わない(既存の設定を用いる) フィルタ設定 : 行わない(別途ipchainsの設定を行う) a.はじめにadsl-setupコマンドを起動します。 # adsl-setup b.プロバイダ接続のためのユーザ名を入れます。 USER NAME >>> Enter your PPPoE user name (default bxxxnxnx@sympatico.ca): test@turbolinux.co.jp ADSLモデムを接続しているイーサネットインターフェース名を入力します。 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 eth1): eth1 c.接続要求がある毎に接続を行い、無通信時には切断させるには、接続を切り離すまでの無通信時間を秒単位で入力します。 常時接続環境の場合はデフォルトnoとします。通常は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 d.プロバイダのDNSサーバのIPアドレスを入力します。 既に/etc/resolv.confにDNSの設定がある場合は、空Enterとします。また、接続時にプロバイダのサーバーがDNS情報を送り込んでくる場合は server と入力します。 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: e.上記でDNSアドレス(プライマリ)を入力した場合は、セカンダリDNSアドレスも力できます。 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: f.プロバイダ接続のためのパスワードを入力します。 PASSWORD >>> Please enter your PPPoE password: ******** >>> Please re-enter your PPPoE password: ******** g.ipchainsの基本的な設定を行います。 別途ipchainsの設定を行う場合など、ここではipchainsをいじりたくない場合は 0 を入力します。 通常は 0を入力して、ここではipchainsをいじらないようにするほうが良いでしょう。 ipchainsを使い慣れていない場合などは、このホストの用途に応じて 1 (rp-pppoeを設定するマシンだけでInternetを利用する場合)や 2 (ローカルLAN上の他のマシンもrp-pppoeを設定するマシンを通してInternetを利用する場合)を入力することで、ipchainsの基本的な設定がなされます。 FIREWALLING 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): 0 h.ここで今までの入力値がサマリー表示されます。 ** Summary of what you entered ** Ethernet Interface: eth1 User name: test@turbolinux.co.jp Activate-on-demand: No DNS addresses: Do not adjust Firewalling: NONE i.表示された入力値の確認です。問題なければyを入力します。 >>> Accept these settings and adjust configuration files (y/n)? 以上で設定は完了です。 【接続/切断】 接続はroot権限にて次のコマンドを入力します。 # adsl-start ... Connected! Connected! と表示されれば接続成功です. 切断は次のコマンドです。 # adsl-stop 【自動接続/自動切断】 システム起動時に自動接続させ、システムシャットダウン時に自動切断させるには、システム起動時に /etc/rc.d/init.d/adsl が起動するようにします。 常時接続環境では通常この方法を用いることが多いでしょう。 # chkconfig --add adsl