sudo apt-get install firestarter
Firestarter的啟動(dòng)腳本是/etc/init.d/firestarter,其中執(zhí)行了
/etc/firestarter/firestarter.sh來(lái)啟動(dòng)防火墻,因此,其實(shí)Firestarter真正的啟動(dòng)腳本是
/etc/firestarter/firestarter.sh。
編輯/etc/firestarter/firestarter.sh
根據(jù)本機(jī)ifconfig的輸出信息來(lái)修改以下幾行代碼:
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`
例如,我的系統(tǒng)使用eth0上網(wǎng),就執(zhí)行ifconfig eth0。其中IP地址依然可以通過(guò)以上代碼的第一行獲取,只是子網(wǎng)掩碼和廣播地址的獲取會(huì)有問(wèn)題。于是保留第一行不做修改,將后兩行代碼中g(shù)rep搜索的英文字符串改為相應(yīng)中文字符串即可。
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`
保存文件后,啟動(dòng)Firestarter。一切正常。
(以上來(lái)來(lái)自http://sanhex.bloggerspaces.com/index.html)
來(lái)自:http://dingwl.spaces.live.com/Blog/cns!ED2CFB949D04FD0F!220.entry