Skip to contentSkip to conversation

DNAT for two external NIC

DISCUSSION Ming-Ching Tiew 2 participants 3 messages Sep 1, 2006

lore
Share & tools
lore
#0 lore raw

Pascal Hambourg wrote :-

Quoted 9 lines

Hello,

Quoted 6 lines · Mikhail

Everything works fine if I use IP1 address but I was unable to get to the
corresponding LAN machine through IP2. Ping requests are also not responded if they're made to IP2. They do reach eth2 and I can see them using tcpdump but then nothing goes out on any NIC. The same goes for TCP/IP requests - I've managed to trace them to the nat table PREROUTING chain but they could not be found in either INPUT or FORWARD chain of the mangle table. If I make

Quoted 7 lines

default route through eth2 - >everything starts working through that NIC and

Quoted 1 line

stops through eth1.

Maybe you need to disable rp_filter (reverse path filtering) on the interface that has not the default route.

sysctl -w net/ipv4/conf/eth2/rp_filter=0

Isn't this a bug in rp_filter ? In multipath routing, it's often the system will have multiple routing tables. The rp_filter seems to only look at the main routing table.

Regards.

#1 lore raw
Quoted 9 lines · Ming-Ching Tiew
Quoted 4 lines

Maybe you need to disable rp_filter (reverse path filtering) on the interface that has not the default route.

sysctl -w net/ipv4/conf/eth2/rp_filter=0

Isn't this a bug in rp_filter ? In multipath routing, it's often the system will have multiple routing tables. The rp_filter seems to only look at the main routing table.

It looks at different tables (according to ip rule). I've recently posted a problem with the same solution. The problem was with the fwmark in the ip rules.

http://lists.netfilter.org/pipermail/netfilter/2006-August/066553.html

Signature · 1 line
mati
#2 lore raw

From: "longraider" <[email protected]>

Quoted 12 lines
Quoted 9 lines · Ming-Ching Tiew
Quoted 4 lines

Maybe you need to disable rp_filter (reverse path filtering) on the interface that has not the default route.

sysctl -w net/ipv4/conf/eth2/rp_filter=0

Isn't this a bug in rp_filter ? In multipath routing, it's often the system will have multiple routing tables. The rp_filter seems to only look at the main routing table.

Quoted 6 lines

It looks at different tables (according to ip rule). I've recently posted a problem with the same solution. The problem was with the fwmark in the ip rules.

http://lists.netfilter.org/pipermail/netfilter/2006-August/066553.html

I did not go through your post carefully enough to know what you are talking about. But my question was why do we have to turn off reverse filter path checking to get multipath routing to work ? The original idea of reverse filter path checking is to improve security by doing reverse path checking, ie by checking the source IP address of all packets coming in via an interface against the networks known to be behind that interface, the firewall/router can simply drop packets that aren't supposed to come from there. In the multipath routing case, the packets are INDEED supposed to be from the interface where it is coming from, why they are dropped ?

Regards.