vine-users ML アーカイブ



[vine-users:077777] pppoeで iptablesがリセットされる

  • From: warbird <pxz02461@xxxxxxxxx>
  • Subject: [vine-users:077777] pppoeで iptablesがリセットされる
  • Date: Sun, 11 Nov 2007 18:42:16 +0900
warbirdと申します。御世話になっております。

現在、Vine Linux 4.1を、ルーターを挟まず直接ADSLモデムに直結し、
pppoeを起動時にstartさせ、利用しております。

ファイアウォールの設定もしておくべきかと思いまして、
http://penguin.nakayosi.jp/linux/iptables.html
を参考に設定しました。
/etc/sysconfig/iptablesに設定を保存し、/etc/init.d/iptables restart
としました。
設定内容は、iptables -Lにより、
----参照1
Chain INPUT (policy DROP)
target     prot opt source               destination
ACCEPT     icmp --  anywhere             anywhere
ACCEPT     0    --  anywhere             anywhere
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:https
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ftp
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ssh
ACCEPT     0    --  anywhere             anywhere            state RELATED,ESTABLISHED
----
こんな感じです。

しかしながら、Linuxを再起動すると、pppoeの起動が最後に行われる為、
pppoeでiptablesの内容が下記の様に変わってしまいます。
----参照2
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
LOG        udp  --  anywhere             anywhere            udp dpts:0:1023 LOG level warning
LOG        tcp  --  anywhere             anywhere            tcp dpts:0:1023 LOG level warning
DROP       udp  --  anywhere             anywhere            udp dpts:0:1023
DROP       tcp  --  anywhere             anywhere            tcp dpts:0:1023
LOG        tcp  --  anywhere             anywhere            tcp flags:FIN,SYN,RST,ACK/SYN LOG level warning
DROP       tcp  --  anywhere             anywhere            tcp flags:FIN,SYN,RST,ACK/SYN
DROP       icmp --  anywhere             anywhere            icmp echo-request
----

これを回避する為に、/etc/init.d/rcファイルを編集し、強引にpppoeが
済んだ後に、/etc/init.d/iptables restartを起動し、設定を上記、参照1に
戻しております。
しかし、本来ならもっと賢い方法があるように思えます。
pppoeとiptablesの起動順序を、pppoe->iptablesの様にすればいいのでしょうが、
どうすれば良いのかわかりません。
初歩的な質問で申し訳ないのですが、アドバイス頂きたいのですが。
よろしくお願いします。

--
warbird : pxz02461@xxxxxxxxx