Re: Route packets by source IP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Tue, 18 Mar 2008 09:18:30 -0500, Grant Taylor
<gtaylor@xxxxxxxxxxxxxxxxx> 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/


--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux