Linux Netfilter discussions
 help / color / mirror / Atom feed
* Packet disappears after DNAT?
@ 2015-12-04  9:43 Scott Bronson
  2015-12-04 11:55 ` Anton Danilov
  2015-12-05 10:31 ` Pascal Hambourg
  0 siblings, 2 replies; 17+ messages in thread
From: Scott Bronson @ 2015-12-04  9:43 UTC (permalink / raw)
  To: netfilter

Is there any reason for a packet to just disappear when it gets
DNATed?  (other than rp_filter, which is disabled)


Background:

I have a typical libvirt setup, where VMs share a private network,
and the host masquerades them onto the internet.

In addition, the host is forwarding port 25 to a VM using DNAT.


The Problem:

I log into the VM and try to connect to port 25 on the host's public
IP.

  $ ncat u32.net 25

On the VM, that command just times out.  It works from the internet
and on the host (thanks Noel).

Logging demonstrates that the VM sends the packet to the host just fine.
Then, after the host DNATs it, it just disappears.  I would expect it to
get routed back to the VM.


More Details:

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

Can anyone tell me what to look at here?  I'm stumped.

    - Scott

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2015-12-19 16:38 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox