Policy base forwarding issues

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

Hello All,

I am trying to setup a linux box as a forwarding router based of src IP. The problem is that it does forward the pkts to the intended server specified in the ip rule, but it also forwards it to the original dst (dst specified in the pkt).

Here is the setup:

[]                                                                                     []
         |                                                                                                       |
         |                [A]                                                    [B]                          |
         |-------[] ----------- [] ---------|
         |       linux box only has                      linux-router in question              |
         |      net.ipv4.ip_forward=1                                                                 |
         |                                                                                                      |
[]                                                                                       []

A - is just a linux box doing forwarding for the 2 networks 10.1.x.x - > 172.16.1.x.
B - is the linux router which I want to setup as forwarding.

The pkts come from and .167  ->  to
I want to setup rules on [B] to forward all pkts with src addr. to
And, all pkts from to should still go to

Here are the rules I setup.

[root@forwarder ~]# ip rule sh
0:      from all lookup local
32765:  from lookup 225
32766:  from all lookup main
32767:  from all lookup default

[root@forwarder ~]# ip ro sh tab 225 via dev eth1

The pkts still go to both .225 and .100. I checked on another machine connected to the same switch as and and its not receiving the pkts. So, it doesnt seem like the switch is screwing up and broadcasting the packets everywhere.

I would appreciate any kind of help or pointers.

Thanks for your time.

-- pranav

LARTC mailing list

[Bugtraq]     [Fedora Legacy]     [GCC Help]     [Yosemite News]     [Yosemite Photos]     [IP Tables]     [Netfilter Devel]     [Fedora Users]

Powered by Linux