Linux Netfilter discussions
 help / color / mirror / Atom feed
* DNAT - newbie question
@ 2005-07-28 22:36 Dharanikanth Dugginni
  2005-08-03 20:55 ` curby .
  0 siblings, 1 reply; 2+ messages in thread
From: Dharanikanth Dugginni @ 2005-07-28 22:36 UTC (permalink / raw)
  To: netfilter

Hello,

How do I dynamically change the destination address when performing
the DNAT functionality?

Lets suppose a host h1 is sending packets to addr N1 (this is the addr
for NAT box)  I want to change this addr to a different addr which
will not be known until after few packets arrive from h1 to n1.
(Appears from the conntrack and NAT tables documenatation that after
the first packet, the DNAT table will not be used any more).  Is there
a way to force subsequent pacekets in the same stream to always use
the DNAT table?

Any pointers on the dependencies between conntrack and NAT are also
highly appreciated.

Thanks,
-Dhar


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

* Re: DNAT - newbie question
  2005-07-28 22:36 DNAT - newbie question Dharanikanth Dugginni
@ 2005-08-03 20:55 ` curby .
  0 siblings, 0 replies; 2+ messages in thread
From: curby . @ 2005-08-03 20:55 UTC (permalink / raw)
  To: Dharanikanth Dugginni; +Cc: netfilter

On 7/28/05, Dharanikanth Dugginni <dharanikanthd@gmail.com> wrote:
> Lets suppose a host h1 is sending packets to addr N1 (this is the addr
> for NAT box)  I want to change this addr to a different addr which
> will not be known until after few packets arrive from h1 to n1.
> (Appears from the conntrack and NAT tables documenatation that after
> the first packet, the DNAT table will not be used any more).  Is there
> a way to force subsequent pacekets in the same stream to always use
> the DNAT table?

Are you using stateful rules?  If not, your DNAT rule handles packets
heading to N1, and NAT code transparently deals with packets heading
the other way.  If you are using an ESTABLISHED state-matching rule,
then only the first packet matches the DNAT rule, and then state
matching rule allows subsequent packets through, while NAT still
happens in the background.  At least I think so. =)


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

end of thread, other threads:[~2005-08-03 20:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-28 22:36 DNAT - newbie question Dharanikanth Dugginni
2005-08-03 20:55 ` curby .

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