免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 3962 | 回复: 11
打印 上一主题 下一主题

[网络管理] 关于IPTABLES的问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-11-19 14:47 |只看该作者 |倒序浏览
[root@postfix extensions]# iptables -V
iptables v1.3.8
[root@postfix extensions]# uname -r
2.4.20-8
netfiler patch :patch-o-matic-ng-20071117
按照白金大哥的V2.2的文档,发现没生成libipt_ipp2p.so文件!是哪里出了问题?

论坛徽章:
0
2 [报告]
发表于 2007-11-19 14:58 |只看该作者
过程中有什么错误提示吗?
没有的话不应该没有生成 libipt_ipp2p.so 文件

论坛徽章:
0
3 [报告]
发表于 2007-11-19 15:07 |只看该作者
原帖由 platinum 于 2007-11-19 14:58 发表
过程中有什么错误提示吗?
没有的话不应该没有生成 libipt_ipp2p.so 文件

好像没,其他的平常的模块都有了
[root@postfix extensions]# ls -l *.so
-rwxr-xr-x    1 root     root         8475 Nov 18 23:53 libip6t_connmark.so
-rwxr-xr-x    1 root     root         9456 Nov 18 23:53 libip6t_CONNMARK.so
-rwxr-xr-x    1 root     root         7257 Nov 18 23:53 libip6t_eui64.so
-rwxr-xr-x    1 root     root         8535 Nov 18 23:53 libip6t_hl.so
-rwxr-xr-x    1 root     root         8629 Nov 18 23:53 libip6t_HL.so
-rwxr-xr-x    1 root     root        10712 Nov 18 23:53 libip6t_icmp6.so
-rwxr-xr-x    1 root     root         8983 Nov 18 23:53 libip6t_length.so
-rwxr-xr-x    1 root     root         9614 Nov 18 23:53 libip6t_limit.so
-rwxr-xr-x    1 root     root        11064 Nov 18 23:53 libip6t_LOG.so
-rwxr-xr-x    1 root     root         8494 Nov 18 23:53 libip6t_mac.so
-rwxr-xr-x    1 root     root         8408 Nov 18 23:53 libip6t_mark.so
-rwxr-xr-x    1 root     root         7984 Nov 18 23:53 libip6t_MARK.so
-rwxr-xr-x    1 root     root        12313 Nov 18 23:53 libip6t_multiport.so
-rwxr-xr-x    1 root     root         8027 Nov 18 23:53 libip6t_NFQUEUE.so
-rwxr-xr-x    1 root     root         9615 Nov 18 23:53 libip6t_owner.so
-rwxr-xr-x    1 root     root         9554 Nov 18 23:53 libip6t_physdev.so
-rwxr-xr-x    1 root     root        14892 Nov 18 23:53 libip6t_policy.so
-rwxr-xr-x    1 root     root         7199 Nov 18 23:53 libip6t_standard.so
-rwxr-xr-x    1 root     root         8879 Nov 18 23:53 libip6t_state.so
-rwxr-xr-x    1 root     root         8244 Nov 18 23:53 libip6t_TCPMSS.so
-rwxr-xr-x    1 root     root        12608 Nov 18 23:53 libip6t_tcp.so
-rwxr-xr-x    1 root     root         9939 Nov 18 23:53 libip6t_udp.so
-rwxr-xr-x    1 root     root         9798 Nov 18 23:52 libipt_addrtype.so
-rwxr-xr-x    1 root     root         9636 Nov 18 23:52 libipt_ah.so
-rwxr-xr-x    1 root     root         8225 Nov 18 23:53 libipt_CLASSIFY.so
-rwxr-xr-x    1 root     root         8198 Nov 18 23:52 libipt_comment.so
-rwxr-xr-x    1 root     root         8473 Nov 18 23:52 libipt_connmark.so
-rwxr-xr-x    1 root     root         9454 Nov 18 23:53 libipt_CONNMARK.so
-rwxr-xr-x    1 root     root        14523 Nov 18 23:52 libipt_conntrack.so
-rwxr-xr-x    1 root     root        10184 Nov 18 23:53 libipt_DNAT.so
-rwxr-xr-x    1 root     root         9800 Nov 18 23:52 libipt_dscp.so
-rwxr-xr-x    1 root     root         9715 Nov 18 23:53 libipt_DSCP.so
-rwxr-xr-x    1 root     root         9420 Nov 18 23:52 libipt_ecn.so
-rwxr-xr-x    1 root     root         9335 Nov 18 23:53 libipt_ECN.so
-rwxr-xr-x    1 root     root         9640 Nov 18 23:52 libipt_esp.so
-rwxr-xr-x    1 root     root        13552 Nov 18 23:52 libipt_hashlimit.so
-rwxr-xr-x    1 root     root         8039 Nov 18 23:52 libipt_helper.so
-rwxr-xr-x    1 root     root        11051 Nov 18 23:52 libipt_icmp.so
-rwxr-xr-x    1 root     root         9528 Nov 18 23:52 libipt_iprange.so
-rwxr-xr-x    1 root     root        11202 Nov 19 11:37 libipt_ipv4options.so
-rwxr-xr-x    1 root     root         7208 Nov 19 11:37 libipt_IPV4OPTSSTRIP.so
-rwxr-xr-x    1 root     root         8949 Nov 18 23:52 libipt_length.so
-rwxr-xr-x    1 root     root         9612 Nov 18 23:53 libipt_limit.so
-rwxr-xr-x    1 root     root        11069 Nov 18 23:53 libipt_LOG.so
-rwxr-xr-x    1 root     root         8492 Nov 18 23:53 libipt_mac.so
-rwxr-xr-x    1 root     root         8406 Nov 18 23:53 libipt_mark.so
-rwxr-xr-x    1 root     root         9540 Nov 18 23:53 libipt_MARK.so
-rwxr-xr-x    1 root     root         8786 Nov 18 23:53 libipt_MASQUERADE.so
-rwxr-xr-x    1 root     root         7108 Nov 18 23:53 libipt_MIRROR.so
-rwxr-xr-x    1 root     root        12343 Nov 18 23:53 libipt_multiport.so
-rwxr-xr-x    1 root     root         8932 Nov 18 23:53 libipt_NETMAP.so
-rwxr-xr-x    1 root     root         8025 Nov 18 23:53 libipt_NFQUEUE.so
-rwxr-xr-x    1 root     root         7110 Nov 18 23:53 libipt_NOTRACK.so
-rwxr-xr-x    1 root     root        10398 Nov 18 23:53 libipt_owner.so
-rwxr-xr-x    1 root     root         9552 Nov 18 23:53 libipt_physdev.so
-rwxr-xr-x    1 root     root         8977 Nov 18 23:53 libipt_pkttype.so
-rwxr-xr-x    1 root     root        14265 Nov 18 23:53 libipt_policy.so
-rwxr-xr-x    1 root     root        10767 Nov 18 23:53 libipt_realm.so
-rwxr-xr-x    1 root     root         8881 Nov 18 23:53 libipt_REDIRECT.so
-rwxr-xr-x    1 root     root         9912 Nov 18 23:53 libipt_REJECT.so
-rwxr-xr-x    1 root     root         9474 Nov 18 23:53 libipt_SAME.so
-rwxr-xr-x    1 root     root        14561 Nov 18 23:53 libipt_sctp.so
-rwxr-xr-x    1 root     root        10383 Nov 19 11:37 libipt_set.so
-rwxr-xr-x    1 root     root        10755 Nov 19 11:37 libipt_SET.so
-rwxr-xr-x    1 root     root        10120 Nov 18 23:53 libipt_SNAT.so
-rwxr-xr-x    1 root     root         7197 Nov 18 23:53 libipt_standard.so
-rwxr-xr-x    1 root     root         8877 Nov 18 23:53 libipt_state.so
-rwxr-xr-x    1 root     root         8865 Nov 18 23:53 libipt_tcpmss.so
-rwxr-xr-x    1 root     root         8250 Nov 18 23:53 libipt_TCPMSS.so
-rwxr-xr-x    1 root     root        12606 Nov 18 23:53 libipt_tcp.so
-rwxr-xr-x    1 root     root         9612 Nov 18 23:53 libipt_tos.so
-rwxr-xr-x    1 root     root         8919 Nov 18 23:53 libipt_TOS.so
-rwxr-xr-x    1 root     root         8673 Nov 18 23:53 libipt_ttl.so
-rwxr-xr-x    1 root     root         8661 Nov 18 23:53 libipt_TTL.so
-rwxr-xr-x    1 root     root        10541 Nov 19 11:37 libipt_u32.so
-rwxr-xr-x    1 root     root         9937 Nov 18 23:53 libipt_udp.so
-rwxr-xr-x    1 root     root        10100 Nov 18 23:53 libipt_ULOG.so
-rwxr-xr-x    1 root     root         7088 Nov 18 23:53 libipt_unclean.so

论坛徽章:
0
4 [报告]
发表于 2007-11-19 15:10 |只看该作者
确实不应该,建议你贴出你的操作过程及提示,同时自己也再好好检查一下做的是否正确

论坛徽章:
0
5 [报告]
发表于 2007-11-19 15:18 |只看该作者
我自己再编译一 次

论坛徽章:
0
6 [报告]
发表于 2007-11-19 15:36 |只看该作者
[root@postfix patch-o-matic-ng-20071117]# more README.newpatches
Here is how to add your new `foo' patch to patch-o-matic-ng:

1) Create the directory `foo' to hold the files of your patch.

2) Create a kernel patch by 'diff', which can then be applied
   inside the kernel tree by `patch -p1' and call it
   `foo/linux.patch'. If your patch works with 2.4 or 2.6 kernel
   tree only, then encode the version dependency in the patch name
   as `foo/linux-2.4.patch' or `foo/linux-2.6.patch` respectively.

3) Create an info file called `foo/info' with the content:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Title:          terse description of the patch
Author:         author (name, E-mail address)
Status:         Testing|Experimental|Alpha|Beta|Stable
Repository:     submitted|pending|base|extra
Requires:       repository-entry ==|>|<|>=|<= kernel-version|iptables-version
Depends:        [!]patch-name
Recompile:      kernel|netfilter|iptables
Successor:      patch-name

After an empty line, the description of your patch for
patch-o-matic-ng.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

   The `Repository' entry is mandantory, the other ones are optional.
   `Requires', `Depends' and `Recompile' entries may occur multiple times.

   As we already mentioned, version dependency can be encoded in the
   repository entry name. But version dependency can be specified by
   the `Requires' entries too, where the repository entry is the name
   of the patch file or patch directory tree under the patch directory
   'foo', for which the requirement must be fulfilled. For example
   the following conditions:

Requires: linux-2.4 >= 2.4.25
Requires: linux-2.4.patch >= 2.4.25

   means

   - first, the files under the directory linux-2.4 and the patch file
     linux-2.4.patch can be applied for kernels from the 2.4 series,
     according to the name encoding
   - and second, according to the requirement, these patches are specifically
     valid for kernels equal or above 2.4.25 from the 2.4 series.

   Please note, the same version dependency can be achieved by name encoding
   as well: linux-2.4.25.patch can be applied for kernel versions equal above
   2.4.25 in the 2.4 kernel tree. However, if linux-2.4.25.patch is valid
   for 2.4.25 only, you *must* use the additional requirement line

Requires: linux-2.4.25.patch == 2.4.25

   in order to fully specify the version dependency.
   
   When checking the version requirements first name encoding is checked
   then the requirements specified in the info file.

   Dependency or clash with other patches can be specified by the `Depends'
   entries. You specify the name of the patch your patch depends on or clashes
   with, at the latter case the patch name preceded by '!'.

   With the `Recompile' entries you can (and please do) give hints to the users
   what to recompile after applying your patch: the kernel outside the netfilter
   part; the netfilter part of the kernel; or the iptables binary. When adding
   a new match/target feature patch, you usually have to add

Recompile:      netfilter
Recompile:      iptables

   Dependencies and recompile hints can be listed separated by comma and/or space:

Depends:        foo, !bar
Recompile:      netfilter, iptables

  There is no such possibility for requirements.

  When 'bar' patch depends on 'foo' patch and both patches are already applied,
  it can occur that patch-o-matic cannot detect that 'foo' is already applied
  due to the "clashing" modifications is 'bar'. You can give a hint to pom then
  by specifying

Successor: bar

  in the info file of 'foo' to resolve the issue, by checking wether 'bar' patch
  is applied if 'foo' seems to be not applied. If pom finds that 'bar' applied,
  it will assume that 'foo' applied too.

4) If your patch creates a new CONFIG option, modifies Makefile, adds new
   entry to specific files (net/ipv4/netfilter/ip_conntrack.h) or adds whole
   files to the kernel source tree, then create a patch kernel directory tree
   structure to hold these files, say

        foo/linux/include/linux/netfilter_ipv4/
        foo/linux/include/linux/netfilter_ipv6/
        foo/linux/net/ipv4/netfilter
        foo/linux/net/ipv6/netfilter

   You can use version encoding in the name of the 'linux' directory too, as
   described above.

5) If your patch adds whole files to the kernel source, eliminate those
   from the patch above and add the whole files (not as patch file!) to
   the patch kernel directory tree.

6) If your patch creates a new CONFIG option, eliminate that from the
   patch above. Depending on the kernel version:

   For a 2.4 kernel create a file called
   `foo/linux/net/ipv{4|6}/netfilter/Config.in.ladd'. The format of
   this file is as follows:

EXACT LINE TO FOLLOW
<text to paste in>

   This allows you to specify the entry in net/ipv4/netfilter/Config.in
   that you wish your text to follow.  Note that it must be an exact match.
   You can have more than one of these files, to make multiple entries
   in different places as Config.in.ladd, Config.in.ladd_2, etc.

   You also need to make an entry in Documentation/Configure.help;
   once again, eliminate this from your patch file and create a file
   called `foo/linux/Documentation/Configure.help.ladd' like so:

EXACT CONFIG OPTION TO FOLLOW
<text to paste in>

   Your text will be placed after the config option you indicated
   (with a blank line before and after). You can have more than one
   of these files, to make multiple entries in different places, by
   calling successive Configure.help.ladd(_n) files.

   For a 2.6 kernel create a file called
   `foo/linux/net/ipv{4|6}/netfilter/Kconfig.ladd' with your new
   configuration options with the help text included.

7) If you want to add new parts to a Makefile, ip_conntrack.h or other
   files with already existing well defined "entry points", eliminate
   that from the patch above and create a file `file-to-be-modified.ladd'
   in the patch directory tree. The format of the file is as follows:

EXACT LINE TO FOLLOW
<text to paste in>

   You can have more than one of these files to make multiple entries
   in different places, by calling successive file-to-be-modified.ladd(_n)
   files.

If your original patch file has been completely emptied by removing
   the parts above then just remove the empty patch file from the patch
   directory.

9) For the usespace part, create the directory tree

        foo/iptables/extensions

    for the libipt_foo.c whole file. Add a test for your extension called
    `foo/iptables/extensions/.foo-test'. This should be a small shell
    script which prints the names of the libraries to be built if the
    corresponding include file exists in the kernel tree (this test may
    be more complex: figure out some way of reliably detecting that the
    kernel patch has been applied to $KERNEL_DIR). Typically your test
    script could look like this

#!/bin/sh
# True if foo is applied
[ -f $KERNEL_DIR/include/linux/netfilter_ipv4/ipt_foo.h ] && echo foo

10) Add a man page entry, describing the functionality of your extension
    as foo/iptables/extensions/libipt_foo.man.

11) If you patch the iptables source besides adding whole files, you
    can add that part as `foo/iptables.patch'.

Enjoy!
Netfilter Core Team
难道是这个的原因??

论坛徽章:
5
IT运维版块每日发帖之星
日期:2015-08-06 06:20:00IT运维版块每日发帖之星
日期:2015-08-10 06:20:00IT运维版块每日发帖之星
日期:2015-08-23 06:20:00IT运维版块每日发帖之星
日期:2015-08-24 06:20:00IT运维版块每日发帖之星
日期:2015-11-12 06:20:00
7 [报告]
发表于 2007-11-19 15:48 |只看该作者
干嘛要这么复杂。
到ipp2p网站去下载一个单独的IPP2P包,去编译多好。
只需要内核头文件和IPTABLES的源码即可。
省去了很多麻烦,同样也省掉了很多出错的因素。

论坛徽章:
0
8 [报告]
发表于 2007-11-19 15:49 |只看该作者
哪个原因?没看到关键性内容啊?

论坛徽章:
0
9 [报告]
发表于 2007-11-19 16:09 |只看该作者
Requires: linux-2.4 >= 2.4.25
Requires: linux-2.4.patch >= 2.4.25

论坛徽章:
0
10 [报告]
发表于 2007-11-19 17:04 |只看该作者
是不是这个原因啊?这个patch太新?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP