sudo apt-get install firestarter
Firestarter的啟動腳本是/etc/init.d/firestarter,其中執行了
/etc/firestarter/firestarter.sh來啟動防火墻,因此,其實Firestarter真正的啟動腳本是
/etc/firestarter/firestarter.sh。
編輯/etc/firestarter/firestarter.sh
根據本機ifconfig的輸出信息來修改以下幾行代碼:
IP=`/sbin/ifconfig $IF | grep inet | cut -d : -f 2 | cut -d \ -f 1`
MASK=`/sbin/ifconfig $IF | grep Mas | cut -d : -f 4`
BCAST=`/sbin/ifconfig $IF |grep Bcast: | cut -d : -f 3 | cut -d \ -f 1`
例如,我的系統使用eth0上網,就執行ifconfig eth0。其中IP地址依然可以通過以上代碼的第一行獲取,只是子網掩碼和廣播地址的獲取會有問題。于是保留第一行不做修改,將后兩行代碼中grep搜索的英文字符串改為相應中文字符串即可。
IP=`/sbin/ifconfig $IF | grep inet | cut -d : -f 2 | cut -d \ -f 1`
MASK=`/sbin/ifconfig $IF | grep 掩碼: | cut -d : -f 4`
BCAST=`/sbin/ifconfig $IF |grep 廣播: | cut -d : -f 3 | cut -d \ -f 1`
保存文件后,啟動Firestarter。一切正常。
(以上來來自http://sanhex.bloggerspaces.com/index.html)
來自:http://dingwl.spaces.live.com/Blog/cns!ED2CFB949D04FD0F!220.entry