功能:
当端口扫描时返回所有端口开放状态
系统: pf防火墙
freebsd 6-current测试通过
openbsd 3.6未测试
安装方法:
1. 截取以下一段内容,建立新文件pf.c.diff ;或者在如下地址下载:
===============================================
2858c2858,2859
< !(th->th_flags & th_rst)) {
---
> (!(th->th_flags & th_rst) ||
> !(th->th_flags & th_fin))) {
2860c2861
<
---
>
2864c2865
< ack++;
---
> return (pf_drop);
2867c2868
< ntohl(th->th_ack), ack, th_rst|th_ack, 0, 0,
---
> ntohl(th->th_ack), ack, th_syn|th_ack, 0, 0,
===============================================
">
2. 补丁方法:
# cd /sys/contrib/pf/net/
# patch -p0 pf.c hmm... looks like a normal diff to me...
patching file pf.c using plan a...
hunk #1 succeeded at 2858.
hunk #2 succeeded at 2861.
hunk #3 succeeded at 2865.
hunk #4 succeeded at 2868.
done
3. 重新配置内核,确认编译进了pf相关选项;
device pf
device pflog
device pfsync
4. 重新编译内核和内核模块;
# cd /sys/i386/conf/
# config generic
# cd ../compile/generic
# make depend && make && make modules && make install
如果喜欢freebsd pf的tarp补丁请收藏或告诉您的好朋友.
阅读(138) | 评论(0) | 转发(0) |