狼爱上狸

我胡汉三又回来了

Ubuntu7.04防火墙Friestarter的配置

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

posted on 2007-08-07 22:43 狼爱上狸 阅读(537) 评论(0)  编辑  收藏 所属分类: LINUX


只有注册用户登录后才能发表评论。


网站导航: