こんにちは。松田陽一 _at_ PAL-NET三鷹です。 From: MATSUDA Yoh-ichi / 松田陽一 <matsuda _at_ palnet.or.jp> Subject: [linux-users:80356] Re: ip_dynaddr and filtering rule with ipchains Date: Mon, 19 Feb 2001 08:28:09 +0900 > > diald を使っていないし、ip_dynaddr のことも良く知らないので想像で書い > > てしまいますが、ONESHOT connections が指すのは diald を動かす原因となっ > > た一発目のコネクションを指すのではないかと思います。 > > つまり、source address が ppp0 のアドレスではない一発目のコネクション > > をも、動的に ppp0 のアドレスに書き換えてから送信してくれるということで > > はないでしょうか。 > # カーネルソースや web を検索してみたんですが、 ip_dynaddr に関して > # 詳細に書いてある文献が見つかりません。 > # 英文でも結構です、というか、多分英文しかないと思います、在処を > # ご存知の方、いらっしゃいましたらフォローをお願いします。(__) http://www.linuxdoc.org/ で検索を試みました。 Linkname: Linux IP Masquerade HOWTO: Setting Up IP Masquerade URL: http://www.linuxdoc.org/HOWTO/IP-Masquerade-HOWTO-3.html # Dynamic IP users: # # If you get your IP address dynamically from SLIP, PPP, or DHCP, enable this # following option. This enables dynamic-ip address hacking in IP MASQ, # making the life with Diald and similar programs much easier. # #echo "1" > /proc/sys/net/ipv4/ip_dynaddr 実は、上記の文章の意味がよくわからないので質問した次第です。 Linkname: Linux VPN Masquerade HOWTO: Configuring the Linux firewall URL: http://www.linuxdoc.org/HOWTO/VPN-Masquerade-HOWTO-3.html 3.7 A note about dynamic IP addressing If your firewall is assigned a dynamic IP address by your ISP (dialup accounts are this way, as are some cable internet services), then you should add the following to the startup script /etc/rc.d/rc.local: 「ファイアウォールが ISP によって動的に IP アドレスを割り当てられる なら (ダイヤルアップアカウントはこの方法であり、ケーブルインターネット サービスの一部もこれと等しい) 、以下を起動スクリプト /etc/rc.d/rc.local に追加する:」 echo 7 > /proc/sys/net/ipv4/ip_dynaddr This enables dynamic IP address following, which means that should your connection drop and be reestablished, any active sessions will be updated to the new IP address rather than using the old IP address. This does not mean that the session will continue across the interruption, rather that it will be closed down quickly. 「これは動的 IP アドレスの追跡を可能にする。このことは接続動作が 失われ、再接続された際に、あらゆるアクティブなセッションが古い IP アドレスを使用していた時から新たな IP アドレスで更新されること を意味する。 このことはセッションが切断を越えて継続されることを意味するもの ではない。むしろすぐに切断されてしまう。」 If you do not do this, then there may be a "dead period" after you redial and before old masq table entries expire where you're being masqueraded with the wrong IP address, which will prevent your establishing a connection. 「もしこれを行わなければ、リダイヤル後に "死の終り" となり、それ以前 の古い masq テーブルの登録情報は誤った IP アドレスによってマスカレード された、接続の確率を阻害する要因として破棄される。」 This is particularly helpful if you are using a demand-dial daemon such as diald to manage your dialup connection. 「これは特に、ダイヤルアップ接続を管理する diald のような、デマンド ダイヤルデーモンを使用する際の助けになる。」 See /usr/src/linux/Documentation/networking/ip_dynaddr.txt for more details. 「詳細は /usr/src/linux/Documentation/networking/ip_dynaddr.txt を 参照のこと。」 Linkname: Linux IP Masquerade HOWTO: Other IP Masquerade Issues and Software Support URL: http://www.linuxdoc.org/HOWTO/IP-Masquerade-HOWTO-6.html 4. There is a timeout that will occur with the first connection. This is inevitable if you are using analog modems. The time taken to establish the modem link and the PPP connections may cause your client program (WWW browser, etc.). This isn't common though. If this does happen, just retry that Internet traffic request (say a WWW page) again and it should come up fine. You can also try setting echo "1" > /proc/sys/net/ipv4/ip_dynaddr kernel option to help with this initial setup. 「最初の接続の時間切れが起こる。 これはアナログモデムを使用している場合、必然的なことである。 モデムの同期と PPP 接続にかかる時間は、 (WWW ブラウザ等の) クライアント プログラムによって生じる。 しかしながらこれは一般的ではない。 もしこのことが起これば、 (WWW ページのような) インターネットの トラフィック要求が再発生し、良好に接続されるだろう。 この初期設定を助けるために、カーネルオプションの echo "1" > /proc/sys/net/ipv4/ip_dynaddr も同様に設定を試みるとよい。」 どうも、再接続後に、直前の切断時にカーネルが抱えていた「masqテーブル」 を、新たに割り振られた IP アドレスにて再利用する、という主旨ではない かと思います。 -- ♪ねぇ、雪が降るまえに。 松田 陽一(yoh) mailto:matsuda _at_ palnet.or.jp http://www2.palnet.or.jp/~matsuda/index.htm
References:
- [linux-users:80040] ip_dynaddr and filtering rule with ipchainsMATSUDA Yoh-ichi / 松田陽一
- [linux-users:80329] Re: ip_dynaddr and filtering rule with ipchainsOGAWA Hirofumi
- [linux-users:80356] Re: ip_dynaddr and filtering rule withipchainsMATSUDA Yoh-ichi / 松田陽一
- Prev by Subject: [linux-users:80443] 複数台のサーバーのパフォーマンスの低下
- Next by Subject: [linux-users:80445] Re: bindが応答しなくなる
- Previous by thread: [linux-users:80356] Re: ip_dynaddr and filtering rule withipchains
- Next by thread: [linux-users:80457] Re: ip_dynaddr and filtering rule with ipchains
- Indexes:[Main][Thread]