netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* What's the default NAT type by using MASQUERADE target.
@ 2009-12-18  6:28 Sharevon
  0 siblings, 0 replies; only message in thread
From: Sharevon @ 2009-12-18  6:28 UTC (permalink / raw)
  To: netfilter

Hi,

Look at this topology.

                          192.168.1.1    10.0.0.1             10.0.0.2
       172.0.0.1
      ------------                -------------------
          --------------                      ------------
      |   PC 1 |----------------| NAT (linux)
|---------------------------|   router  |----------------------|  PC 2
|
      ------------                -------------------
          --------------                      ------------
  192.168.1.100
                                      172.0.0.100

Configure "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE" on
NAT(linux) with two different version kernel.

On PC1, ping 172.0.0.100 -t 3, PC2 can be reached with both kernel version.

ping 172.0.0.100 -t 2, I got 2 different results with 2 different
kernel version on NAT(linux).

I got ttl-expired icmp response from router with old version, but got
no response at all with upgrade kernel version.
No matter with which kernel version, router sends ttl-expired icmp
response from 10.0.0.2 to 10.0.0.1. It's forwarded to the internal
network by old version kernel, but considered as the traffic to the
local process by the upgraded version kernel.
Notice that ping 172.0.0.100 -t 3 works well in both cases.

It seems like the old version performed as a Cone NAT, well the
upgraded one performed as a symmetric NAT. So, what's the default NAT
type if I set rule as "iptables -t nat -A POSTROUTING -o eth0 -j
MASQUERADE", full cone NAT, port restricted cone NAT, restricted cone
NAT, or symmetric NAT? Can this be configurable? If it's configurable,
how to do that?

Thanks.

Sean.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-12-18  6:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-18  6:28 What's the default NAT type by using MASQUERADE target Sharevon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).