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
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
|