免费注册 查看新帖 |

Chinaunix

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

[网络管理] centos AS 3.8/AS 4.4,/RHEL 5.2 三种版本为iptables添加模块. 过程在5楼 [复制链接]

论坛徽章:
0
41 [报告]
发表于 2008-10-10 15:51 |只看该作者
请问这些模块在modprobe.conf 可以正常加载吗。。新手。。还不行。具体谁给讲一下。。对模块这个东西还很生疏

论坛徽章:
0
42 [报告]
发表于 2008-10-14 09:32 |只看该作者
我是专门来收藏帖子的

论坛徽章:
1
2015元宵节徽章
日期:2015-03-06 15:50:39
43 [报告]
发表于 2008-11-24 18:12 |只看该作者
不错不错。不过,谁知道最后提供那个在2.6.18-92.el5内核下的ko.zip是干嘛用的??

论坛徽章:
0
44 [报告]
发表于 2008-12-26 17:55 |只看该作者
原帖由 gearfox 于 2008-9-25 14:30 发表
楼主呀。。

重新启动服务器

键入  iptables -A INPUT -m ipp2p –edk –kazaa –bit -j DROP

提示
iptables: match `ipp2p' v1.3.5 (I'm v1.3..


是不是iptables升级的时候出错了????

是 ...

一样的问题,奇怪了...

time & connlimit模块可用,但ipp2p则提示:]

  1. #iptables -m ipp2p --help
  2. iptables: match `ipp2p' v1.3.5 (I'm v1.3.8).
复制代码

论坛徽章:
0
45 [报告]
发表于 2008-12-27 09:43 |只看该作者
原帖由 ylshjx 于 2008-10-10 09:33 发表




出现这样的情况可以把ipp2p里的make里这两个修改一下就可以编译过去

IPTABLES_SRC = $(wildcard /usr/src/iptables-$(IPTVER))替换成IPTABLES_SRC =  /usr/src/iptables-1.3.8
IPTABLES_VERSION =  ...


非常感谢,此问题已解决!

论坛徽章:
0
46 [报告]
发表于 2008-12-29 13:16 |只看该作者
不错,,,感谢!!!

论坛徽章:
0
47 [报告]
发表于 2009-04-01 17:55 |只看该作者
ipp2p只要是1.3.8以下的,都可以支持,1.4.1有点问题

有点问题,我是新编译的内核2.6.27.7 支持connlimit,我用iptables-1.4.1/2都可以用,
但是用1.3.7出问题,Apr  2 07:54:30 localhost kernel: ip_tables: connlimit match: invalid size 32 != 16
我找了一下,提示说1.3.8解决此问题,我升级到1.3.8后不能用,提示:iptables: match `connlimit' v1.3.7 (I'm v1.3..
我后来,对比了一下,1.3.7和1.3.8中的 extensions/目录的内容,发现1.3.8中不支持connlimit这个扩展 

我试到下载iptables 1.4.1/2,安装好后,直接可以使用connlimit这个功能。



还有我下载了1.4.0这个版本 ,无论如何编译都要出错,不知那个老大可以解释一下:

Extensions found:
cc -O2 -Wall -Wunused -I"/lib/modules/2.6.27.7/build"/include -I/usr/src/kernels/linux-2.6.27.7-smp-i686//include -Iinclude/ -DIPTABLES_VERSION=\"1.4.0\"  -fPIC -o extensions/libipt_ah_sh.o -c extensions/libipt_ah.c
In file included from include/libiptc/libiptc.h:7,
                 from include/iptables.h:5,
                 from extensions/libipt_ah.c:8:
include/linux/netfilter_ipv4/ip_tables.h:190: warning: no semicolon at end of struct or union
include/linux/netfilter_ipv4/ip_tables.h:190: error: syntax error before '*' token
include/linux/netfilter_ipv4/ip_tables.h:194: error: syntax error before '}' token
make: *** [extensions/libipt_ah_sh.o] 错误 1


我现在是很想用iptables 1.3.8+ipp2p+connlimit 这几个功能,但是在1.3.8下,connlimit不能用,有点气死人了,模块可以加载


[root@localhost extensions]# iptables -V
iptables v1.3.8

[root@localhost extensions]# iptables -A INPUT -p tcp --syn --dport 23 -m connlimit --connlimit-above 2 -j REJECT
iptables: match `connlimit' v1.3.7 (I'm v1.3..

[root@localhost extensions]# lsmod
Module                  Size  Used by
iptable_filter          7052  1
ip_tables              15512  1 iptable_filter
ipt_ipp2p              12552  0
xt_time                 7048  0
xt_connlimit            8208  0
parport_pc             28008  1
lp                     13736  0
parport                36508  2 parport_pc,lp
autofs4                21920  0
sunrpc                173360  3
ipt_REJECT              7176  1
nf_conntrack_ipv4      17184  5
xt_state                6280  5
xt_tcpudp               7432  6
x_tables               17932  7 ip_tables,ipt_ipp2p,xt_time,xt_connlimit,ipt_REJECT,xt_state,xt_tcpudp
microcode              13488  0
dm_mirror              21512  0


那个兄弟有时间看一下

论坛徽章:
0
48 [报告]
发表于 2009-07-27 15:46 |只看该作者
强贴。。感谢分享,正好最近好做访问限制。


http://ie.archive.ubuntu.com/sou ... -layer7-v2.9.tar.gz


layer7的地址变成这个了~~

[ 本帖最后由 疯癫二楞子 于 2009-8-5 15:55 编辑 ]

论坛徽章:
0
49 [报告]
发表于 2009-08-08 11:43 |只看该作者
依照楼主的文章,其它模块没有问题,但使用layer7时有些错误,如下:

  1. #  iptables -A FORWARD -m layer7 --l7proto qq  -m time --timestart 8:00 --timestop 17:30 --days Mon,Tue,Wed,Thu,Fri -m iprange --src-range 192.168.1.5-192.168.1.239 -m ipp2p --ipp2p -m ipp2p --xunlei -j DROP
  2. scandir: No such file or directory
  3. iptables v1.3.8: Couldn't open /etc/l7-protocols
复制代码

论坛徽章:
0
50 [报告]
发表于 2009-08-08 11:45 |只看该作者
但使用iptables -m layer7 --help则没有错误:

49楼的错误不知是否是命令输入有些问题,测试命令是抄的楼主的,layer7的使用还不熟悉。

  1. # iptables -m layer7 --help
  2. iptables v1.3.8

  3. Usage: iptables -[AD] chain rule-specification [options]
  4.        iptables -[RI] chain rulenum rule-specification [options]
  5.        iptables -D chain rulenum [options]
  6.        iptables -[LFZ] [chain] [options]
  7.        iptables -[NX] chain
  8.        iptables -E old-chain-name new-chain-name
  9.        iptables -P chain target [options]
  10.        iptables -h (print this help information)

  11. Commands:
  12. Either long or short options are allowed.
  13.   --append  -A chain            Append to chain
  14.   --delete  -D chain            Delete matching rule from chain
  15.   --delete  -D chain rulenum
  16.                                 Delete rule rulenum (1 = first) from chain
  17.   --insert  -I chain [rulenum]
  18.                                 Insert in chain as rulenum (default 1=first)
  19.   --replace -R chain rulenum
  20.                                 Replace rule rulenum (1 = first) in chain
  21.   --list    -L [chain]          List the rules in a chain or all chains
  22.   --flush   -F [chain]          Delete all rules in  chain or all chains
  23.   --zero    -Z [chain]          Zero counters in chain or all chains
  24.   --new     -N chain            Create a new user-defined chain
  25.   --delete-chain
  26.             -X [chain]          Delete a user-defined chain
  27.   --policy  -P chain target
  28.                                 Change policy on chain to target
  29.   --rename-chain
  30.             -E old-chain new-chain
  31.                                 Change chain name, (moving any references)
  32. Options:
  33.   --proto       -p [!] proto    protocol: by number or name, eg. `tcp'
  34.   --source      -s [!] address[/mask]
  35.                                 source specification
  36.   --destination -d [!] address[/mask]
  37.                                 destination specification
  38.   --in-interface -i [!] input name[+]
  39.                                 network interface name ([+] for wildcard)
  40.   --jump        -j target
  41.                                 target for rule (may load target extension)
  42.   --goto      -g chain
  43.                               jump to chain with no return
  44.   --match       -m match
  45.                                 extended match (may load extension)
  46.   --numeric     -n              numeric output of addresses and ports
  47.   --out-interface -o [!] output name[+]
  48.                                 network interface name ([+] for wildcard)
  49.   --table       -t table        table to manipulate (default: `filter')
  50.   --verbose     -v              verbose mode
  51.   --line-numbers                print line numbers when listing
  52.   --exact       -x              expand numbers (display exact values)
  53. [!] --fragment  -f              match second or further fragments only
  54.   --modprobe=<command>          try to insert modules using this command
  55.   --set-counters PKTS BYTES     set the counter during insert/append
  56. [!] --version   -V              print package version.

  57. LAYER7 match v1.3.8 options:
  58. --l7dir <directory>  : Look for patterns here instead of /etc/l7-protocols/
  59.                        (--l7dir must be specified before --l7proto if used!)
  60. --l7proto [!] <name> : Match the protocol defined in /etc/l7-protocols/name.pat
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP