如何给iptables添加模块v2.2(含视频教程)[3]

[入库:2005年9月19日] [更新:2007年3月24日]

本文简介:

iptables -A FORWARD -s 192.168.1.0/24 -m ipp2p --edk --bit -j DROP 
提示我iptables v1.3.1: Couldn't load match `ipp2p':/usr/local/lib/iptables/libipt_ipp2p.so: cannot open sha..........[/quote:adc9dd8d12]
iptables的Makefile好像有BUG,虽然指定了LIB=/sbin,但是有时候还会装到/usr/local/lib下
所以我在文档里加了一步ln -s /lib/iptables /usr/local/lib/iptables
你一定没做这步吧?

 hongfengyue 回复于:2005-03-09 15:52:03 kernel 2.6开门不顺呀!!
首先string 这个好功能不支持kernel2.6的内核,气死我了!!!!!!!!!
还在进一步研究中,发现编译iptables会产生很多错误。

明天搞了。

 lihn 回复于:2005-03-09 17:10:58 [quote:24042dddb7="platinum"]
iptables的Makefile好像有BUG,虽然指定了LIB=/sbin,但是有时候还会装到/usr/local/lib下
所以我在文档里加了一步ln -s /lib/iptables /usr/local/lib/iptables
你一定没做这步吧?[/quote:24042dddb7]
ln -s /lib/iptables /usr/local/lib/iptables也运行了。

我把/lib/iptables下的libipt_ipp2p.so /usr/local/lib/iptables/ 里就可以运行iptables -A FORWARD -s 192.168.1.0/24 -m ipp2p --edk --bit -j DROP
但是执行iptables -I INPUT -p tcp --dport 23 -m iplimit --iplimit-above 2 -j REJECT是提示:
Segmentation fault
怎么解决?

 platinum 回复于:2005-03-09 17:20:59 ipp2p能用,证明没问题
iplimit不行,可能是因为你没打好那个patch
有的patch确实不能用
我只打了几个:
ipp2p、connlimit、iprange、NETMAP、time、string、l7-layer、geoip
其他我用不到都没加进去,否则容易出乱子

个人感觉,最有用的是ipp2p、iprange、time、string、geoip、l7-layer
connlimit和NETMAP用的不多,但是也会用到

 lihn 回复于:2005-03-09 17:23:03 既然pp2p,time,iprange等能用,那iplimit也应该能用啊。而且在安装过程中也没提示我iplimit模块出错的

 platinum 回复于:2005-03-09 17:32:36 我刚才查了一下netfilter网站,你确定你说的是“iplimit”?
我怎么没查到那个模块呢?

 lihn 回复于:2005-03-09 17:42:48 那我怎么能查看我的iptables加载了那些模块?
还有iptables -I INPUT -p tcp --dport 23 -m connlimit --connlimit-above 2 -j REJECT
和iptables -I INPUT -p tcp --dport 23 -m iplimit --iplimit-above 2 -j REJECT 有什么区别?
iptables -I INPUT -p tcp --dport 23 -m connlimit --connlimit-above 2 -j REJECT可以正常运行

 platinum 回复于:2005-03-09 17:46:49 所有的模块的源代码都在iptables源码的extensions目录下

 lihn 回复于:2005-03-09 17:49:32 明白了,如果想限制每个ip的连接数应该用connlimit

 lihn 回复于:2005-03-10 11:41:37 ipp2p好像不能限制BT啊。一点作用都没有!

 platinum 回复于:2005-03-10 11:50:43 不要说的那么绝对
是ipp2p不行,还是你不行?
我试过,没问题的
不知道你是怎么试的

 platinum 回复于:2005-03-10 11:54:01 [quote:0a46148ce6]
This module matches certain packets in P2P flows. It is not
designed to match all packets belonging to a P2P connection -
use IPP2P together with CONNMARK for this purpose. Also visit
http://www.ipp2p.org for detailed information.

Use it together with -p tcp or -p udp to search these protocols
only or without -p switch to search packets of both protocols.

IPP2P provides the following options:
.TP
.B "--edk "
Matches as many eDonkey/eMule packets as possible.
.TP
.B "--kazaa "
Matches as many KaZaA packets as possible.
.TP
.B "--gnu "
Matches as many Gnutella packets as possible.
.TP
.B "--dc "
Matches as many Direct Connect packets as possible.
.TP
.B "--bit "
Matches BitTorrent packets.
.TP
.B "--apple "
Matches AppleJuice packets.
.TP
.B "--soul "
Matches some SoulSeek packets. Considered as beta, use careful!
.TP
.B "--winmx "
Matches some WinMX packets. Considered as beta, use careful!
.TP
.B "--ares "
Matches Ares and AresLite packets. Use together with -j DROP only.
.TP
.B "--ipp2p "

本文关键:如何给iptables添加模块v2.2(含视频教程)
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top