From: Franck JONCOURT <franck.mail@dthconnex.com>
To: netfilter@vger.kernel.org
Subject: Re: Route packets by source IP
Date: Wed, 19 Mar 2008 19:21:46 +0100 [thread overview]
Message-ID: <43cba8b55bae94158c0580f06e368ea4@localhost> (raw)
In-Reply-To: <47DFCF36.3060500@riverviewtech.net>
Hi,
On Tue, 18 Mar 2008 09:18:30 -0500, Grant Taylor
<gtaylor@riverviewtech.net> wrote:
> On 03/18/08 07:01, Steffen Heil wrote:
>> 2. At A: Route every packet "from A2:P" to B2.
>> - otherwise A would try to route to the client via its gateway, which
>> would fail because of the private sender ip. -
>
>> But I don't know how to do the second.
>>
>> Any hints?
>
> You need to use policy based routing. In short, set up an additional
> routing table very similar to the main routing table save for using B as
> the default gateway rather than A. Then you use Traffic Control (tc)
> rules to direct the kernel to use the new routing table for the traffic
> that you want to manually route.
This is perhaps not a good way to do, but I was thinking about using the
__ip route__ command.
ip route add 192.168.2.0/24 via 192.168.0.2
where 192.168.2.0/24 would be the B1 network and 192.168.0.2
would be the B2 ip address.
Is that wrong ?
---
Franck Joncourt
http://www.debian.org/ - http://smhteam.info/wiki/
next prev parent reply other threads:[~2008-03-19 18:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-18 12:01 Route packets by source IP Steffen Heil
2008-03-18 14:18 ` Grant Taylor
2008-03-19 18:21 ` Franck JONCOURT [this message]
2008-03-19 21:19 ` Grant Taylor
2008-03-19 22:03 ` Steffen Heil
2008-03-20 0:02 ` Grant Taylor
2008-03-20 0:30 ` Steffen Heil
2008-03-20 14:42 ` Grant Taylor
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=43cba8b55bae94158c0580f06e368ea4@localhost \
--to=franck.mail@dthconnex.com \
--cc=netfilter@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox