最終更新日 2002/11/24
Linux で フレッツADSL 接続をしたのでそれについて書きます。
ぷりんこ研究所さんのカーネルモードPPPoE設定に成功しました。(rp-pppoe不要)
詳しくは研究所のページへどうぞ。
私が使ったカーネルは 2.4.20-rc3 です。
rp-pppoeを使っているときよりも反応が早くなりました。
NTT から送られてくる『フレッツ接続ツール』には、Linux 用の接続ソフトが付属しています。
しかし説明書が不親切でなんだかよく設定の仕方が分かりません。(^^;;
Roaring Penguin Software の rp-pppoe を使用して接続しました。
このソフトには設定ツールがあるので便利です。
ネットワークカードの設定をします。
私の /etc/sysconfig/network-scripts/ifcfg-eth0 の内容は以下のとおり。
本当にこの程度の設定でいいのかはよく分かりません。(笑)
DEVICE=eth0
BOOTPROTO=none
ONBOOT=no
BROADCAST=
NETWORK=
NETMASK=
IPADDR=
USERCTL=no
次に root で adsl-setup コマンドを実行します。
# adsl-setup
>>> Enter your PPPoE user name (default hogehoge@hoge.net): [あなたのID]
>>> 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 などのネットワークカード]
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 $DEMAND): [no]
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: [必要ならば ISP の 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: [必要ならばセカンダリ DNS を入力]
>>> Please enter your PPPoE password: [ISP のパスワードを入力]
>>> Please re-enter your PPPoE password: [もう一度入力]
(以下、簡易ファイアウォールの設定)
設定が終わったら adsl-start コマンドで接続してみます。
# adsl-start
接続に成功したら Connect と表示されます。
RPM パッケージを利用した場合、/etc/rc.d/init.d/adsl をインストールしてくれるので、
ntsysv などで adsl を有効にすると Linux 起動時に接続してくれます。(^^)
# chkconfig --del adsl
# chkconfig --add adsl
rp-pppoe の簡易ファイアーウォール機能は kernel 2.2 系列で採用されている ipchains が使用されていますが、
kernel 2.4 に徐々に移行しつつあり、2.4 ではより強力な iptables が採用されています。
kernel 2.4 でも ipchains モジュールを組み込めば ipchains が使用できますが NAT などでほかのモジュールと衝突する場合があり iptables を使った方が無難です。
ということで rp-pppoe 用の簡易ファイアーウォールの設定ファイルを iptables 用に書き換えたものを置いておきます。
firewall-standalone
firewall-masq
オリジナルの設定ファイルをバックアップした上で使ってください。
モジュールの設定を ipchains から iptables に変更するのを忘れずに。
firewall-masq.txt の方は # Do masquerading 以下を自分用にいじってあるので書き換える必要があるかも。
ADSL connect が timeout してしまう
上記の不具合の解決法はここからの抜粋です。
ここを見つけたときはうれしかった。(^^)