LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-14-2010, 12:49 AM   #1
chobong
Member
 
Registered: Jan 2010
Posts: 90

Rep: Reputation: 15
Please help compile ipt_route with path-o-matic


Dear All,

I have to load ipt_route into my iptables on Centos 5.3 .
I found a document about this
Code:
http://www.netfilter.org/documentation/HOWTO//netfilter-extensions-HOWTO-2.html#ss2.2
But I see that I cannot download and install like the document.
Code:
# cvs -d :pserver:cvs@pserver.netfilter.org:/cvspublic login
(When it asks you for a password type `cvs').
# cvs -d :pserver:cvs@pserver.netfilter.org:/cvspublic co netfilter/userspace netfilter/patch-o-matic
I don't know where's the correct link . Could you please share to me a detail for loading ipt_route?
Thanks so much!
 
Old 09-14-2010, 01:25 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
'patch-o-matic-ng' : Patch-O-Matic New Generation.

Google .. Patch-O-Matic ..

http://www.netfilter.org/projects/pa...-external.html

http://www.intra2net.com/en/developer/ipt_ACCOUNT/

The files
http://ftp.netfilter.org/pub/patch-o-matic-ng/
http://ftp.netfilter.org/pub/patch-o-matic-ng/snapshot/
patch-o-matic-ng-20100218.tar.bz2, 18-Feb-2010 23:55, 18K
etc. etc.
 
Old 09-14-2010, 02:41 AM   #3
chobong
Member
 
Registered: Jan 2010
Posts: 90

Original Poster
Rep: Reputation: 15
Thanks, knudfl!

I run ./runme successful. But I don't know how to recompile kernel and load ipt_route?
Please help me...
 
Old 09-14-2010, 04:02 AM   #4
chobong
Member
 
Registered: Jan 2010
Posts: 90

Original Poster
Rep: Reputation: 15
My server is :
Code:
 
uname -r
2.6.18-128.el5
I followed steps:
- yum install kernel-devel
- yum install iptables-devel
- download iptables-1.4.0.tar.bz2 and extract this file to /root/iptables-1.4.0
- download patch-o-matic-ng to /root/patch-o-matic-ng
- cd /root/patch-o-matic-ng
- ./runme --download
Code:
...
Successfully downloaded external patch rpc
Hey! KERNEL_DIR is not set.
Where is your kernel source directory? [/usr/src/linux] /usr/src/kernels/2.6.18-194.11.3.el5-i686
Hey! IPTABLES_DIR is not set.
Where is your iptables source code directory? [/usr/src/iptables] /root/iptables-1.4.0
- ./runme route
Code:
...
Excellent! Source trees are ready for compilation.
- cd /usr/src/kernels/2.6.18-194.11.3.el5-i686
- make oldconfig
- make prepare
- make modules_prepare
- cd /usr/src/kernels/2.6.18-194.11.3.el5-i686/net/ipv4/netfilter
Code:
ip_conntrack_mms.c      ip_conntrack_rsh.c   ip_nat_quake3.c  ip_set_iphash.c      ip_set_iptreemap.c  ipt_connlimit.c    ipt_IPV4OPTSSTRIP.c  ipt_set.c     Kconfig
ip_conntrack_quake3.c   ip_conntrack_rtsp.c  ip_nat_rtsp.c    ip_set_ipmap.c       ip_set_macipmap.c   ipt_IPMARK.c       ipt_pknock.c         ipt_SET.c     Makefile
ip_conntrack_rpc_tcp.c  ip_conntrack_talk.c  ip_nat_talk.c    ip_set_ipporthash.c  ip_set_nethash.c    ipt_ipp2p.c        ipt_ROUTE.c          ipt_TARPIT.c
ip_conntrack_rpc_udp.c  ip_nat_mms.c         ip_set.c         ip_set_iptree.c      ip_set_portmap.c    ipt_ipv4options.c  ipt_rpc.c            ipt_time.c
- make -C /usr/src/kernels/2.6.18-194.11.3.el5-i686 M=$PWD modules
Code:
make: Entering directory `/usr/src/kernels/2.6.18-194.11.3.el5-i686'
make[1]: *** No rule to make target `/usr/src/kernels/2.6.18-194.11.3.el5-i686/net/ipv4/netfilter/ip_conntrack_standalone.o', needed by `/usr/src/kernels/2.6.18-194.11.3.el5-i686/net/ipv4/netfilter/ip_conntrack.o'.  Stop.
make: *** [_module_/usr/src/kernels/2.6.18-194.11.3.el5-i686/net/ipv4/netfilter] Error 2
make: Leaving directory `/usr/src/kernels/2.6.18-194.11.3.el5-i686'
I don't know how to fix this? There is not ip_conntrack.o in /usr/src/kernels/2.6.18-194.11.3.el5-i686/net/ipv4/netfilter... (

Last edited by chobong; 09-14-2010 at 04:29 AM.
 
Old 09-14-2010, 08:45 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Well, 'kernel-devel' is a limited package, almost no files.
Is meant only for building drivers, that come with their own
headers, etc.

The kernel source is kernel-2.6.18-194.el5.src.rpm, 79M
http://mirror.centos.org/centos/5.5/...94.el5.src.rpm

You have tons of work ahead of you, before you can use it :
Comes with at least 100 patches.
But may be you in some way can edit the file kernel.spec
and make things fit together ?
..
 
Old 09-14-2010, 10:59 PM   #6
chobong
Member
 
Registered: Jan 2010
Posts: 90

Original Poster
Rep: Reputation: 15
Thank you so much for your reply!

I downloaded *.src.rpm and compiled again. But when I run
make -C /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i686 M=$PWD modules

Code:
$ make -C /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i686 M=$PWD modules
make: Entering directory `/usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i686'

  WARNING: Symbol version dump /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i686/Module.symvers
           is missing; modules will have no dependencies and modversions.

  CC [M]  /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i686/net/ipv4/netfilter/ip_conntrack_standalone.o
In file included from include/linux/netfilter_ipv4/ip_conntrack.h:31,
                 from /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i686/net/ipv4/netfilter/ip_conntrack_standalone.c:34:
include/linux/netfilter_ipv4/ip_conntrack_talk.h:7:43: error: linux/netfilter_ipv4/lockhelp.h: No such file or directory
In file included from include/linux/netfilter_ipv4/ip_conntrack.h:31,
                 from /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i686/net/ipv4/netfilter/ip_conntrack_standalone.c:34:
include/linux/netfilter_ipv4/ip_conntrack_talk.h:10: warning: data definition has no type or storage class
include/linux/netfilter_ipv4/ip_conntrack_talk.h:10: warning: type defaults to ‘int’ in declaration of ‘DECLARE_LOCK_EXTERN’
include/linux/netfilter_ipv4/ip_conntrack_talk.h:10: warning: parameter names (without types) in function declaration
make[1]: *** [/usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i686/net/ipv4/netfilter/ip_conntrack_standalone.o] Error 1
make: *** [_module_/usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i686/net/ipv4/netfilter] Error 2
make: Leaving directory `/usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i686'
[admin@localhost netfilter]$ ls /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i686/M
MAINTAINERS  Makefile
...
 
Old 09-15-2010, 06:10 AM   #7
chobong
Member
 
Registered: Jan 2010
Posts: 90

Original Poster
Rep: Reputation: 15
I tried with another patch-o-matic, it's ok but have no ipt_route in that patch.
Seems ipt_route is disabled for latest patchs version? But when I use an old patch, it shows error like previous reply...

How to I can add ipt_route into my iptables? >.<
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Setting a different library path on compile brainlesspinkey Linux - Software 7 11-13-2005 05:42 PM
Can't compile in directories not in PATH tutwabee Linux - Software 5 09-27-2004 09:37 PM
Lib path and compile toolshed Linux - Software 4 08-27-2004 12:10 PM
What directory path is a good one to compile in? XeoNoX Programming 1 08-19-2004 12:12 AM
gtk path to compile wxwindow zebiloute Linux - Newbie 3 07-16-2003 10:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration