Your don't add $DEV ip route add default via $IP dev $DEV table mail.out 31.05.2002 17:03:10, "Sellaro"<sellaro@email.it> wrote: >> IP: advanced router (CONFIG_IP_ADVANCED_ROUTER) [Y/n/?] >> IP: policy routing (CONFIG_IP_MULTIPLE_TABLES) [Y/n/?] >> IP: use netfilter MARK value as routing key (CONFIG_IP_ROUTE_FWMARK) >[Y/n/?] > >internet:/usr/src/linux# cat .config | grep ROUTER >CONFIG_IP_ADVANCED_ROUTER=y > >internet:/usr/src/linux# cat .config | grep MULTIPLE >CONFIG_IP_MULTIPLE_TABLES=y > >internet:/usr/src/linux# cat .config | grep FWMARK >CONFIG_IP_ROUTE_FWMARK=y > >> iptables -t mangle -A PREROUTING -p tcp --dport 25 -j MARK --set-mark 1 > >OK, I'm marking with 3, not 1, but I think this will not cause any problem: > >iptables -t mangle -A PREROUTING -p tcp --dport 25 -j MARK --set-mark 3 > >> echo 201 mail.out >> /etc/iproute2/rt_tables > >OK. But table is named only mail. > >> ip rule add fwmark 1 table mail.out > >ip ru add fwmark 3 table mail > >ip ru ls >0: >from all lookup local >32765: >from all fwmark 3 lookup mail >32766: >from all lookup main >32767: >from all lookup default > >> ip route add default via $IP dev $DEV table mail.out > >Done. > >You've forgoten to mention flushing route cahce. I did it with: >ip ro flush cache > >And nothing happens as expected. That's why I am writting to the list. > >Thank you for your help. > >-- >Sellaro > >Network Management for the Masses > > > >-- >Prendi GRATIS l'email universale che... risparmia: http://www.email.it/f > >Sponsor: >Tutti i bulbi in offerta... da Peraga risparmi il 30%! >Clicca qui: http://adv2.email.it/cgi-bin/foclick.cgi?mid=448&d=31-5 > ----------------------------------- mailto:alexey_talikov@texlab.com.uz BR Alexey Talikov FORTEK ----------------------------------- _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/