All of lore.kernel.org
 help / color / mirror / Atom feed
* Stateful port redirection?
@ 2010-03-03 22:48 Faré
  2010-03-03 23:32 ` Pascal Hambourg
  0 siblings, 1 reply; 2+ messages in thread
From: Faré @ 2010-03-03 22:48 UTC (permalink / raw)
  To: netfilter

Dear netfilter hackers,

I'm studying options for Hot Upgrade for servers that require high availability.

Is it possible using netfilter to
a- redirect TCP traffic from port 10000 (visible to the public) to
port 10010 (invisible to the public)
b- change the rule so that that traffic to port 10000 is now
redirected to port 10020 (also invisible to the public) *except* for
packets associated with existing connections, that will remain
redirected to port 10010.

I can imagine that others have needed this feature and that it already
exists. Or I can imagine that nobody bothered about the connections
that were lost. I can also imagine heavyweight ways to do everything
in user-space, with the old server passing the TCP socket fd to the
new server over a AF_UNIX socket.

So -- has it been done before? If not, how hard would it be to add a
packet filter that would do that -- and that could be updated
dynamically to switch again to another port, etc.?

--#f
"I object to doing things that computers can do."
        — Olin Shivers

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

* Re: Stateful port redirection?
  2010-03-03 22:48 Stateful port redirection? Faré
@ 2010-03-03 23:32 ` Pascal Hambourg
  0 siblings, 0 replies; 2+ messages in thread
From: Pascal Hambourg @ 2010-03-03 23:32 UTC (permalink / raw)
  To: netfilter

Hello,

Faré a écrit :
> 
> Is it possible using netfilter to
> a- redirect TCP traffic from port 10000 (visible to the public) to
> port 10010 (invisible to the public)

What do you mean by invisible ?

> b- change the rule so that that traffic to port 10000 is now
> redirected to port 10020 (also invisible to the public) *except* for
> packets associated with existing connections, that will remain
> redirected to port 10010.

Yes. This is the way stateful NAT works. Changes in NAT rules apply only
to new connections.

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

end of thread, other threads:[~2010-03-03 23:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-03 22:48 Stateful port redirection? Faré
2010-03-03 23:32 ` Pascal Hambourg

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.