logo

Navigation:First_Community->Computer->Virus Goto:New TopicSettingSearch
Snort_inline常见问题
Posted by: imac Date: March 29, 2008 02:44AM

CopyRight owned by the original author.--(www.MegaEntry.com)

bronco 于 2004年 11月03日 发表

Snort_inline常见问题

keywords: snort_inline faq 常见问题Snort_inline常见问题

原文链接:http://snort-inline.sourceforge.net/FAQ.html

译者:bronco http://theway.blogchina.com 2004/11/03

CopyRight owned by the original author.--(www.MegaEntry.com)

转载请注明出处,禁止用于商业用途。 我在编译snort_inline时出错了我在运行snort_inline时出错了Snort_inline不能丢弃任何数据包我需要使用哪个版本的libnet?

MegaEntry - Social networking and discussion site!

我只想用snort_inline来处理有我所选的部分流量,我该怎么做?   问:我在编译snort_inline时出错了,以下是我编译时提示的错误信息:

gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I../../src

MegaEntry - Social networking and discussion site!

 

-I/usr/include/pcap -I../../src/output-plugins

-I../../src/detection-plugins -I../../src/preprocessors  -I/usr/include

-g -O2 -Wall -DGIDS -D_BSD_SOURCE -D__BSD_SOURCE -D__FAVOR_BSD

-DHAVE_NET_ETHERNET_H -DLIBNET_LIL_ENDIAN -c `test -f 'spo_alert_fast.c '

|| echo './ '`spo_alert_fast.c

CopyRight owned by the original author.--(www.MegaEntry.com)

In file included from /usr/include/linux/netfilter_ipv4/ip_queue.h:10,

                 from /usr/include/libipq.h:37,

                 from ../../src/inline.h:8,

                 from ../../src/snort.h:38,

                 from spo_alert_fast.c:51:

/usr/include/linux/if.h:59: redefinition of `struct ifmap '

MegaEntry - Social networking and discussion site!

/usr/include/linux/if.h:77: redefinition of `struct ifreq '

/usr/include/linux/if.h:126: redefinition of `struct ifconf '

make[3]: *** [spo_alert_fast.o] Error 1

make[3]: Leaving directory

`/home/matt/src/BUILD/snort-2.0.5/src/output-plugins '

make[2]: *** [all-recursive] Error 1

CopyRight owned by the original author.--(www.MegaEntry.com)

make[2]: Leaving directory `/home/matt/src/BUILD/snort-2.0.5/src '

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/home/matt/src/BUILD/snort-2.0.5 '

make: *** [all] Error 2 

答:你需要更新glibc中关于内核的头文件。快速解决方法是在/usr/include和内核源码目录之间创建一个链接。例如,如果你用的内核版本是2.4.24,你可以这样做:

CopyRight owned by the original author.--(www.MegaEntry.com)

 

cd /usr/include

mv linux linux.orig

ln -s /usr/src/linux-2.4.24/include/linux linux 

现在,你可以进入snort_inline目录进行重编译了(记得先make clean哦)

CopyRight owned by the original author.--(www.MegaEntry.com)

 

** 就是说,需要指明实际的内核头文件而不是RedHat的glibc-kernheaders包. ** 

问:我在运行snort_inline时出错,以下是报错信息:

Reading from iptables

Running in IDS mode

CopyRight owned by the original author.--(www.MegaEntry.com)

Log directory = /var/log/snort

Initializing Inline mode

InitInline: : Failed to send netlink message: Connection refused 

答:这意味着snort_inline不能和iptables通讯,因为ip_queue模块未被载入。你可以用命令lsmod验证一下。如果在列出的内容中你没有看到ip_queue,你需要在启动snort_inline之前装载该模块,命令为:insmod ip_queue. 

MegaEntry - Social networking and discussion site!

 

问:Snort_inline不能丢弃任何数据包,哪儿错了?

答:可能有以下几方面的原因:

首先,你在桥模式下运行snort_inline。如果内核没有用桥下防火墙补丁重新编译过,桥将不会把包传给iptables,因此,也不会把包传给snort_inline。最简单的测试方法是启动桥模式并且把iptable的规则设为丢弃,如果包还能穿过桥,那么你需要去下载桥下防火墙的内核补丁,把它用到内核中,然后重编译内核。

其次,你需要检查一下snort_inline.conf文件中的HOME_NET变量,确认一下是否设置为你需要监控的网络。Snort_inline只对来于或者去往监控网络的流量采取动作。 

MegaEntry - Social networking and discussion site!

问:我需要使用哪个版本的libnet?

答:snort_inline和flexresp一样,依赖于相同的libnet库版本:1.0.x.。用1.1.x版本的libnet来编译snort_inline将不能正常工作。 

问:我只想用snort_inline来处理有我所选的部分流量,我该怎么做?

答:这里有一个用snort_inline来监控SMTP流量的例子

1. iptables -A FORWARD -m state --state ESTABLISHED,RELATED -p tcp --dport 25 -j QUEUE

CopyRight owned by the original author.--(www.MegaEntry.com)

2. iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT

3. iptables -A FORWARD -p tcp --dport 25 -m state --state NEW -j QUEUE



Reply To This Message
Subject: 

Copyright 2005-2006 megaentry,All Rights Reserved
IE 6.0 or above is perfect