Subject: Re: MASQUERADE/SNAT and multiple interfaces with the same IP

From: Florian Westphal <[email-masked]>
Date: Fri, 16 Aug 2013 13:04:43 +0200

Kristian Evensen <[email-masked]> wrote:
> After spending long time looking at the source code, I can't figure
> out why this happens. Once the MASQUERADE/SNAT rule has been inserted,
> to me everything looks the same.

The MASQUERADE target zaps conntracks that it "owned" when the
associated link goes down, see masq_device_event() in ipt_MASQUERADE.c

Also, the nat core zaps conntracks when they are sent out on an
interface other than the original interface.

See nf_nat_oif_changed() in iptable_nat.c