狼愛(ài)上貍

          我胡漢三又回來(lái)了

          導(dǎo)航

          <2007年8月>
          2930311234
          567891011
          12131415161718
          19202122232425
          2627282930311
          2345678

          統(tǒng)計(jì)

          常用鏈接

          留言簿(20)

          隨筆分類(lèi)

          隨筆檔案

          hideto

          java友

          搜索

          最新評(píng)論

          閱讀排行榜

          評(píng)論排行榜

          Ubuntu7.04防火墻Friestarter的配置

          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

          posted on 2007-08-07 22:43 狼愛(ài)上貍 閱讀(549) 評(píng)論(0)  編輯  收藏 所屬分類(lèi): LINUX

          主站蜘蛛池模板: 游戏| 东乌珠穆沁旗| 天水市| 庆云县| 内丘县| 青铜峡市| 洛隆县| 即墨市| 达州市| 泗阳县| 义乌市| 华亭县| 孟连| 临邑县| 大余县| 凤凰县| 巨野县| 淮北市| 望江县| 商都县| 邢台县| 永川市| 墨竹工卡县| 渝中区| 湖南省| 开江县| 通榆县| 丰镇市| 江油市| 靖安县| 江华| 樟树市| 子洲县| 鄂伦春自治旗| 米泉市| 太仆寺旗| 华亭县| 花莲市| 大洼县| 集贤县| 卫辉市|