All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sellaro" <sellaro@email.it>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Wierd Policy Routing Behaviour
Date: Fri, 31 May 2002 12:03:10 +0000	[thread overview]
Message-ID: <marc-lartc-102284679128325@msgid-missing> (raw)
In-Reply-To: <marc-lartc-102276759427299@msgid-missing>

> 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
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

  parent reply	other threads:[~2002-05-31 12:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-30 14:05 [LARTC] Wierd Policy Routing Behaviour Sellaro
2002-05-30 15:22 ` Martin A. Brown
2002-05-30 15:42 ` Sellaro
2002-05-31  3:57 ` Alexey Talikov
2002-05-31 11:24 ` Sellaro
2002-05-31 11:44 ` Alexey Talikov
2002-05-31 12:03 ` Sellaro [this message]
2002-05-31 12:15 ` Alexey Talikov
2002-05-31 13:48 ` Sellaro
2002-05-31 14:33 ` Alexey Talikov
2002-05-31 14:45 ` Sellaro
2002-05-31 15:37 ` Alexey Talikov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-lartc-102284679128325@msgid-missing \
    --to=sellaro@email.it \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.