From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Scott Bronson <bronson@rinspin.com>
Cc: Pascal Hambourg <pascal@plouf.fr.eu.org>,
netfilter <netfilter@vger.kernel.org>
Subject: Re: Packet disappears after DNAT?
Date: Tue, 15 Dec 2015 14:06:38 +0100 [thread overview]
Message-ID: <20151215130638.GA6295@salvia> (raw)
In-Reply-To: <CAKmUPx7UQD0zE4ngHanfid4BN8aMFLdJ284peiW0_d8=EFW_JQ@mail.gmail.com>
On Tue, Dec 15, 2015 at 04:21:30AM -0800, Scott Bronson wrote:
> On Sat, Dec 5, 2015 at 2:31 AM, Pascal Hambourg <pascal@plouf.fr.eu.org> wrote:
> > 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
>
> Yes, thank you! I never would have found that. Without it, the
> VM->Host->VM NAT
> just eats the packets.
>
>
> On Mon, Dec 7, 2015 at 12:01 AM, Pascal Hambourg <pascal@plouf.fr.eu.org> wrote:
> > You must also MASQUERADE or SNAT these packets, otherwise the reply
> > packets won't be sent back to the host and be de-NATed properly
>
> You're absolutely right. With two more rules:
>
> iptables -t nat -I POSTROUTING -s 192.168.122.10 -d 192.168.122.10 -p
> tcp -j MASQUERADE
> iptables -t nat -I POSTROUTING -s 192.168.122.10 -d 192.168.122.10 -p
> udp -j MASQUERADE
>
> it works!
>
>
> Gotta say, unning `echo 0 > /proc/sys/net/bridge/bridge-nf-call-iptables` in my
> script makes me a little queasy... but this page suggests that no other option
> will work cross-distro:
>
> http://wiki.libvirt.org/page/Net.bridge-nf-call_and_sysctl.conf
JFYI: The br-nf thing was moved to a separated module since 3.18. So
now this finally requires explicit modprobing.
next prev parent reply other threads:[~2015-12-15 13:06 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
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 [this message]
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=20151215130638.GA6295@salvia \
--to=pablo@netfilter.org \
--cc=bronson@rinspin.com \
--cc=netfilter@vger.kernel.org \
--cc=pascal@plouf.fr.eu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.