Lennyのiptables 起動スクリプト編

■iptablesの設定のリベンジ

 Lennyのiptablesをデーモン化
 http://d.hatena.ne.jp/labunix/20120208

 参考:Getting IPTables to survive a reboot
 http://www.debian-administration.org/articles/445

■以下で十分だということが分かった。

# vim /etc/network/if-up.d/iptables
#!/bin/sh
#iptables-restore -c /etc/iptables-save

■しかし、結局、作ってしまったw。。。
 ポリシー自体はすべてドロップなのだが、ログ取得後に許可している。
 基本的に「fwcustom」だけを設定、ログを減らして行くところからはじめれば良いという
 入門者向けのスクリプト。

 http://sourceforge.jp/users/labunix/pf/smallfirewall/files/?id=960

 「/etc/init.d」に配置、実行権限を与えて、「insserv -v smallfirewall」でOK。
 「LSB tag」の箇所は「cron」からのコピペを修正。
 書式が少しでも異なると、起動スクリプトとして使えないのでご注意を。
 (これは私のせいじゃないw)

 squeezeでも動くはずだけど、まだ試してないので、また後日。。。