Re: iptable_nat and ip_conntrack coupling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 2009-03-26 18:04, Fischer, Anna wrote:

>I'd like to understand how tightly integrated the iptable_nat code
>is with ip_conntrack. If I have rules that define what packets are
>supposed to be NATed (e.g. -j SNAT --to x.x.x.x or -j DNAT --to
>x.x.x.x), then does the code *always* do NAT on packets that match
>those rules?

Only packets with their nf_conn in the NEW state will visit the nat
table, after which a nat-table independent mapping in nf_nat does
the rest. Use of the NOTRACK extension disables thes on a per-packet
basis.

>Or, is there also the requirement that there has to be
>a connection maintained by ip_conntrack before packets are to be
>rewritten?

There is. And in fact, such a connection exists by the time the
rewrite metadata is applied for the first time.

>For example, if there is an ICMP packet coming through
>the iptable_nat code, and it is a REPLY where ip_conntrack has not
>tracked a REQUEST for, then will this prevent the code from
>rewriting the packet, even if the rules match the packet?

Not prevented (see paragraph above).
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux