免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: tyyx
打印 上一主题 下一主题

[FreeBSD] 关于IPFW与FREEBSD5的问题 [复制链接]

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
11 [报告]
发表于 2003-01-29 22:13 |只看该作者

关于IPFW与FREEBSD5的问题

我觉得ipfw用起来简单点,不过ipf也有很多狂热支持者hoho~
ipfw2出来以后功能还是很不错的

论坛徽章:
0
12 [报告]
发表于 2003-01-29 22:14 |只看该作者

关于IPFW与FREEBSD5的问题

这用ipf很容易实现,看看我的。

# allow certain classes of ICMP
pass in quick  proto icmp all icmp-type 0 group 100
pass in quick  proto icmp all icmp-type 3 group 100
pass in quick  proto icmp all icmp-type 11 group 100
block in log proto icmp all group 100

ipf想用Bandwidth管制的可以结合Altq。ipfw实在是过时了。

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
13 [报告]
发表于 2003-01-29 22:19 |只看该作者

关于IPFW与FREEBSD5的问题

有这么严重么?max看新的man page了么ipfw2的?
各种底层的封包好像ipf不行吧?

论坛徽章:
0
14 [报告]
发表于 2003-01-29 22:21 |只看该作者

关于IPFW与FREEBSD5的问题

最后上一贴,过年咯。

Altq的安装

HOWTO install ALTQ on FreeBSD 4.3
27-May-2001

this howto was used to install altq on a stock standard freebsd 4.3 clean installation, presuming you installed the kernel sources in /usr/src directory

cd /usr/src

fetch or wget is your friend, when downloading files. these urls were for the current distribution as of this date

fetch ftp://ftp.csl.sony.co.jp/pub/kjc/altq-3.0.tar.gz

fetch ftp://ftp.csl.sony.co.jp/pub/kjc/altq-3.0-sys-altq-freebsd-4.3.patch

# unpackage the archive

gzip -d altq-3.0.tar.gz

tar -xvf altq-3.0.tar

# rename the new patch for freebsd 4.3

cp altq-3.0-sys-altq-freebsd-4.3.patch   altq-3.0/sys-altq/sys-altq-freebsd-4.3.patch

# patch the kernel and altq src (a backup is made).

# it helps if you have done a 'make clean' recently (optional).

mkdir sys-altq

cd sys

tar cvf - . | (cd ../sys-altq; tar xf -)

cd /usr/src/sys-altq

Now, apply the actual patch itself

patch -p < /usr/src/altq-3.0/sys-altq/sys-altq-freebsd-4.3.patch

# should say something like this after patching and completing successfully


Hunk #6 succeeded at 2389.
Hunk #7 succeeded at 2846.

mkdir altq

cp /usr/src/altq-3.0/sys-altq/altq/* altq/

kame provides a default kernel config file called ALTQ. you may merge your KERNEL config with ALTQ, the only options i needed to ensure i was alright so far.. ymmv or you may not need these. incidentally, some may not approve, but i compiled in ipfilter support and the two coexist quite happily.

cd i386/conf/

cp ALTQ ALTQ.mybackup

vi ALTQ

options SOFTUPDATES

maxusers 64

:wq

Finish compiling the altq tools

config ALTQ

cd ../../compile/ALTQ

make depend

make clean

make

  

# keep a backup of your currently booting kernel

cp /kernel /kernel.mybackup

# install the new kernel which should now include altq support

make install


reboot using the new kernel now
sync

reboot

if at this point all succeeded and rebooted

# finish setting up altq

cd /usr/src/altq-3.0

sh MAKEDEV.altq all

make

make install

# now create a suitable configuration for each nic, I used ed1
# save this file as /etc/altq.conf the default configuration file




--------------------------------------------------------------------------------

# sample configuration file for 56k link
#
interface ed1 bandwidth 33K cbq
class cbq ed1 root NULL pbandwidth 100

#

# meta classes

#

class cbq ed1 ctl_class root pbandwidth 10 control

# CBQ/TYPE, Iface, Name, Parent/Null

class cbq ed1 fast_class root borrow pbandwidth 70
filter ed1 fast_class 0 0 0 53 17 # dns
filter ed1 fast_class 0 0 0 53 6 # dns
filter ed1 fast_class 0 0 0 6667 6 # irc
filter ed1 fast_class 0 6667 0 0 6 # irc
filter ed1 fast_class 0 0 0 22 6 # ssh
filter ed1 fast_class 0 22 0 0 6 # ssh

class cbq ed1 slow_class root borrow pbandwidth 15 default



--------------------------------------------------------------------------------

# at this point you should be able to start using altq

# for bandwidth shaping and prioritising.

# start the daemon

/usr/local/sbin/altqd

# use this to dump statistics occasionally

/usr/local/bin/altqstat -c 2



See: http://www.csl.sony.co.jp/person/kjc/kjc/software.html#ALTQ

论坛徽章:
0
15 [报告]
发表于 2003-01-29 22:22 |只看该作者

关于IPFW与FREEBSD5的问题

原帖由 "quakelee" 发表:
有这么严重么?max看新的man page了么ipfw2的?
各种底层的封包好像ipf不行吧?


没很详细看,ipfw2是stateful的吗?不是的话就免看了。

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
16 [报告]
发表于 2003-01-29 22:24 |只看该作者

关于IPFW与FREEBSD5的问题

看来我有必要学习一下ipf之后再来讨论那个比较好:)

论坛徽章:
0
17 [报告]
发表于 2003-01-29 22:38 |只看该作者

关于IPFW与FREEBSD5的问题

原帖由 "quakelee" 发表:
看来我有必要学习一下ipf之后再来讨论那个比较好:)
嗯,有必要。比如ipf可以在很多平台上用(Net, Free, Open, Solaris),如果你同时用几个系统的话维护一个rule set就可以了,ipfw暂时只在Free上有。

你说ipfw比ipf直观可能是没用过ipfstat -t。

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
18 [报告]
发表于 2003-01-29 23:11 |只看该作者

关于IPFW与FREEBSD5的问题

原帖由 "MaxBSD" 发表:
牛?斜匾?1热鏸pf可以在很多平台上用(Net, Free, Open, Solaris),如果你同时用几个系统的话维护一个rule set就可以了,ipfw暂时只在Free上有。

你说ipfw比ipf直观可能是没用过ipfstat -t。


不要光说我,你研究一下ipfw2吧
嘻嘻

论坛徽章:
0
19 [报告]
发表于 2003-02-01 18:42 |只看该作者

关于IPFW与FREEBSD5的问题

[quote]原帖由 "MaxBSD"]你说ipfw比ipf直观可能是没用过ipfstat -t。[/quote 发表:


就是那个象 top 一样的东东,是挺好的~

不过 Darren Reed 的 license 问题最终害了自己,最终导致 OpenBSD 用户放弃了 ipfilter,现在大概只有 2.x 以前的用户还在用它,而多数都改用 pf 了。

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
20 [报告]
发表于 2003-02-01 19:45 |只看该作者

关于IPFW与FREEBSD5的问题

原帖由 "红袖添香" 发表:


就是那个象 top 一样的东东,是挺好的~

不过 Darren Reed 的 license 问题最终害了自己,最终导致 OpenBSD 用户放弃了 ipfilter,现在大概只有 2.x 以前的用户还在用它,而多数都改用 pf 了。


红袖jj
pf是什么,我没听说过,我觉得ipfw挺好用的,上手很快的,ipf好像有点乱,回头有机会试试
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP