to patch, or not to patch?
Should I do the Patch-o-matic to get the ROUTE patch? or is there a way to do this?
-joe
I have a netfilter box on a monitoring port (span port) of a switch (eth0).
I want to:
- pick out the packets from *-->server and
send them out the back-end eth1 interface.
- pick out the packets from server-->* and
send them out the other back-end eth2 interface
Long ago, in my solaris days, I used ipfilter -- which had a feature like the current ROUTE p-o-m patch, a "bypass system routing, go out this interface now" jump.
Signature · 2 lines
Joe Judge <[email protected]> Guardium
----- Original Message -----
From: "Joe Judge" <[email protected]>
To: <[email protected]>
Sent: Thursday, March 27, 2003 4:27 PM
Subject: to patch, or not to patch?
Quoted 2 lines
Should I do the Patch-o-matic to get the ROUTE patch? or is there a way to do this?
If you don't want to use patch-o-matic and still get something close to ROUTE target, than use MARK target and advanced routing stuff as described in Linux Advanced Routing and Traffic Control HOWTO on http://lartc.org/.
It is quite simple. You mark all packets you want to route differently. Then, you create an alternate routing table based on this very mark using iproute2 stuff. ROUTE target does it all in one shot, it is imho more simple, but you'll have to use POM, so build a new kernel and iptables from sources. MARK+iproute2 does not need POM usage, but likely needs a kernel build as your current one may not support advanced routing stuff, especially use Netfilter mark as routing key.
--
Cédric Blancher <[email protected]>
Consultant en sécurité des systèmes et réseaux - Cartel Sécurité Tél: +33 (0)1 44 06 97 87 - Fax: +33 (0)1 44 06 97 99
PGP KeyID:157E98EE FingerPrint:FA62226DA9E72FA8AECAA240008B480E157E98EE
Re: to patch, or not to patch? --- 1.2.7a mucked up?
Summary --
Why does the recent patch-o-matic version have extra/ROUTE code that uses "ifname" and "ipto" in a structure ... when ... iptables 1.2.7a tries to compile ROUTE support which uses "if_name" and "if_index" ??
What version of iptables code goes with what version of patch-o-matic ?
---- details -----------
problem: need linux box connected to switch mirror/span port on
eth0 to take packets TO hostA and burp them out eth1 and also take packets FROM hostA and burp them our eth2
I appreciate Cedric's posting. This widens the range of choices available to me.
They are:
1 - install BSD or drag my sparc20/solaris box here
and configure IPFilter to
take all packets from x.x.x.x and burp them out interface-1 take all packets to x.x.x.x and burp them out of interface-2 (known solution, I've done it before)
2 - try Cedric's LARC solution
or
3 - Continue banging my head against POM + iptables
So, of course I'm continuing down the #3 path :-)
(no pain, no gain)
Pulled down redhat8.0 kernel source ... did a "make mrproper" because they bundled it in a dorky state.
I pulled down iptables 1.2.6a and 1.2.7a and patch-o-matic20030107.
cd p-o-m KERNEL_DIR=/usr/src/linux-2.4 ./runme extra/ROUTE.patch cd ../iptables1.2.7a make KERNEL_DIR=/usr/src/linux-2.4
---------got this --------------------------------
Extensions found: IPv4:ROUTE
cc -O2 -Wall -Wunused -I/usr/src/linux-2.4/include -Iinclude/ -DIPTABLES_VERSION=\"1.2.7a\" -fPIC -o extensions/libipt_ROUTE_sh.o -c extensions/libipt_ROUTE.c extensions/libipt_ROUTE.c: In function `parse':extensions/libipt_ROUTE.c:61: structure has no member named `if_name'extensions/libipt_ROUTE.c:64: structure has no member named `if_name'extensions/libipt_ROUTE.c:66: structure has no member named `if_name'extensions/libipt_ROUTE.c:67: structure has no member named `if_index'extensions/libipt_ROUTE.c:80: structure has no member named `if_name'extensions/libipt_ROUTE.c:81: structure has no member named `if_index'extensions/libipt_ROUTE.c:86: structure has no member named `if_index'extensions/libipt_ROUTE.c: In function `print':extensions/libipt_ROUTE.c:119: structure has no member named `if_name'extensions/libipt_ROUTE.c:120: structure has no member named `if_name'extensions/libipt_ROUTE.c:122: structure has no member named `if_index'
make: *** [extensions/libipt_ROUTE_sh.o] Error 1
It looks like the include is:/usr/src/linux-2.4.18-27.8.0/include/linux/netfilter_ipv4/ipt_ROUTE.h
which only has:
struct ipt_route_target_info {
char ifname[IPT_ROUTE_IFNAMSIZ];
unsigned int ipto;
};Re: to patch, or not to patch? --- 1.2.7a mucked up?
Quoted 9 lines · Joe Judge
Summary --
Why does the recent patch-o-matic version have extra/ROUTE code that uses "ifname" and "ipto" in a structure ... when ... iptables 1.2.7a tries to compile ROUTE support which uses "if_name" and "if_index" ??What version of iptables code goes with what version of patch-o-matic ?
Use iptables and p-o-m versions from cvs. instructions on how to get it are availiable on http://netfilter.org
You might want to look in https://bugzilla.netfilter.org as well, there's an entry there about this issue.
Signature · 1 line
/Martin