From: "saz" Date: Mon, 20 Dec 2004 04:40:19 +0000 Subject: [LARTC] routing problems using packet marking Message-Id: <000001c4e667$f29fdec0$03c0a8c0@notebook> MIME-Version: 1 Content-Type: multipart/mixed; boundary="----=_NextPart_000_001A_01C4E635.91CB6E20" List-Id: To: lartc@vger.kernel.org This is a multi-part message in MIME format. ------=_NextPart_000_001A_01C4E635.91CB6E20 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi guys, i was trying to implement a redirection of my smtp trafic using = netfilter an iproute with packet marking, just like is explained in = lartc documentation... I will try to explain my configuration bellow: ther are two computers with fedora 2, kernek 2.6.9, iproute2-ss020116 = and iptables v1.2.1. Computers names are pc1 and pc2, the network is = 192.168.192.0... the pc1 is the one in charge to redirect the traffic to = pc2, so for that my configuration is the following one: This configuration is for PC1 with ip 192.168.192.1 First i will mark the packets ( smtp ) iptables -A PREROUTING -t mangle -p tcp --dport 25 -j MARK --set-mark 1=20 then i will make a rule for that mark aiming at the smtp, smtp is = declared in rt_tables ip rule add fwmark 1 table smtp and finally a default route for smtp table ip route add default via 192.168.192.2 table smtp ip ro flush cache So that is what i do, but for some reason is not working, i use iptraf = in order to check where the packets are going, but it seems that they = stops in PC1, an they are not routed to PC2. Anyone have an idea ? thanks ------=_NextPart_000_001A_01C4E635.91CB6E20 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi guys, i was trying to implement a = redirection of=20 my smtp trafic using netfilter an iproute with packet marking, just like = is=20 explained in lartc documentation...
 
I will try to explain my configuration=20 bellow:
 
ther are two computers with fedora 2, = kernek 2.6.9,=20 iproute2-ss020116 and iptables v1.2.1. Computers names are pc1 and pc2, = the=20 network is 192.168.192.0... the pc1 is the one in charge to redirect the = traffic=20 to pc2, so for that my configuration is the following one:
 
This configuration is for PC1 with ip=20 192.168.192.1
 
First i will mark the packets ( smtp = )
iptables -A PREROUTING -t mangle -p tcp = --dport 25=20 -j MARK --set-mark 1
 
then i will make a rule for that mark = aiming at the=20 smtp, smtp is declared in rt_tables
 
ip rule add fwmark 1 table = smtp
 
and finally a default route for smtp=20 table
 
ip route add default via 192.168.192.2 = table=20 smtp
 
ip ro flush cache
 
 
So that is what i do, but for some = reason is not=20 working, i use iptraf in order to check where the packets are going, but = it=20 seems that they stops in PC1, an they are not routed to = PC2.
 
Anyone have an idea ?
thanks
 
 
 
 
 
------=_NextPart_000_001A_01C4E635.91CB6E20-- _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/