Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Pascal Hambourg <pascal@plouf.fr.eu.org>
To: Scott Bronson <bronson@rinspin.com>
Cc: netfilter@vger.kernel.org
Subject: Re: Packet disappears after DNAT?
Date: Sat, 05 Dec 2015 11:31:31 +0100	[thread overview]
Message-ID: <5662BD03.60004@plouf.fr.eu.org> (raw)
In-Reply-To: <CAKmUPx5_sDgRSUQuZmXoCxPnuN3Z0q4df5XECvR7gzY6F3gpDA@mail.gmail.com>

Scott Bronson a écrit :
> Is there any reason for a packet to just disappear when it gets
> DNATed?  (other than rp_filter, which is disabled)
> 
> The VM creates the packet: src=192.168.122.10:23456 dst=173.233.67.174:25
> 
>   * it arrives on the host's raw:PREROUTING
>   * it moves to mangle:PREROUTING
>   * it then goes to nat:PREROUTING
>     * Rule 5 DNATs the destination to 192.168.122.10
> 
> And that's it!  Nothing more happens, the packet is gone.
> 
> Here's my research with tables and traces:
>   https://gist.github.com/bronson/c857a462edb0c6eeab2d

IIUC, you're looping back traffic on a bridge interface. Bridge-nf is
enabled by default and can cause weird behaviour with NAT. Try to
disable it :

echo 0 > /proc/sys/net/bridge/bridge-nf-call-iptables

Without that, after DNAT, the packet is not routed but bridged. But I
suspect that the bridge code won't forward it back to its original port
due to its source MAC address.

  parent reply	other threads:[~2015-12-05 10:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-04  9:43 Packet disappears after DNAT? Scott Bronson
2015-12-04 11:55 ` Anton Danilov
2015-12-04 16:18   ` Scott Bronson
2015-12-06  8:49     ` Anton Danilov
2015-12-07  6:57       ` Scott Bronson
2015-12-05 10:31 ` Pascal Hambourg [this message]
2015-12-07  7:07   ` Scott Bronson
2015-12-07  8:01     ` Pascal Hambourg
2015-12-07  8:06       ` Pascal Hambourg
2015-12-15 12:21       ` Scott Bronson
2015-12-15 13:06         ` Pablo Neira Ayuso
2015-12-15 19:49           ` Pascal Hambourg
2015-12-18  0:41           ` Scott Bronson
2015-12-19 16:34             ` Pascal Hambourg
2015-12-15 19:45         ` Pascal Hambourg
2015-12-18  0:51           ` Scott Bronson
2015-12-19 16:38             ` Pascal Hambourg

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=5662BD03.60004@plouf.fr.eu.org \
    --to=pascal@plouf.fr.eu.org \
    --cc=bronson@rinspin.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