From: Markus Schulz <msc@antzsystem.de>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] FWMark routing trouble
Date: Wed, 02 Aug 2006 10:08:40 +0000 [thread overview]
Message-ID: <200608021208.41393.msc@antzsystem.de> (raw)
Am Samstag, 29. Juli 2006 17:33 schrieb former03 | Baltasar Cevc:
> Hi everybody,
>
> I'm trying to set up routing for 2 links to the internet on a box
> which produces traffic itself (e.g. DNS) and will route all our local
> traffic.
>
> AS one route is quick and expensive and the other one slow and cheap,
> I want to be able to route packets for some high-level protocols to
> the second link.
>
> If I correctly understood table 3-2 in
> http://www.faqs.org/docs/iptables/traversingoftables.html that is not
> possible as the routing decision is taken even before the packet
> touches netfilter for the first time.
>
>
> Is that correct? Does anybody have some hints about how to work
> around?
It's possible with Policy Routing. Look at
http://www.policyrouting.org/PolicyRoutingBook/ONLINE/TOC.html for
documentation about it.
(Simplest?) way to do it: (only short excerpt)
- Mark the specific application packets with iptables in PREROUTING
chain
...
- add rules for routing fwmarked packets to seperate routing tables
ip rule add fwmark <your fwmark #1> table <routing table for slow apps>
ip rule add fwmark <your fwmark #2> table <routing table for fast apps>
- build both routing tables
ip route add default via $PTP1 dev <device #1> src $IP1 proto static
table <routing table for slow apps>
ip route add default via $PTP2 dev <device #2> src $IP2 proto static
table <routing table for fast apps>
(Proto static needs kernel patches, but you don't really need this)
--
Markus Schulz
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
next reply other threads:[~2006-08-02 10:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-02 10:08 Markus Schulz [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-07-29 15:33 [LARTC] FWMark routing trouble former03 | Baltasar Cevc
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=200608021208.41393.msc@antzsystem.de \
--to=msc@antzsystem.de \
--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.