netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: xerces8 <xerces8@butn.net>
Cc: Linux Netdev <netdev@vger.kernel.org>,
	Linux Networking <linux-net@vger.kernel.org>
Subject: Re: "Listenless" TCP over NAT?
Date: Fri, 5 Sep 2008 16:15:12 +0400	[thread overview]
Message-ID: <20080905121511.GA14016@2ka.mipt.ru> (raw)
In-Reply-To: <WorldClient-F200809051345.AA45130148@butn.net>

On Fri, Sep 05, 2008 at 01:45:13PM +0200, xerces8 (xerces8@butn.net) wrote:
> Recently someone mentioned on this (or maybe other...) list a seldom used
> technique of establishing a TCP connection without one host listening on a port,
> but but acting as "clients" and connecting to the peers port.

This is supported by userspace network stack, which was presented here,
but I'm not sure that exactly unetstack was recommended to you.

http://tservice.net.ru/~s0mbre/old/?section=projects&item=unetstack

> My question: Can this be used to establish a TCP connection between two hosts that
> are both behind a (P)NAT router ?
> 
> (the idea being: NAT router lets outgoing connections thru, and in this case both
> NAT router would  see an "outgoing" connection)

Depending on how NAT is implemented. Usually NAT software will only
allow syn/ack packets before connection is established, and thus if one
peer sends syn packet, and second one sends ack packet (without seeng
ack first) it will work, but if second peer's NAT will send a reset
packet before ack from the peer, first NAT can drop connection (as long
as peer itself).

> If yes, this would simplify the life of many users :-)

It is not directly supported by unetstack, but you can simply extend its
state machine to switch to different state without explicit packet
receiving.

-- 
	Evgeniy Polyakov

  parent reply	other threads:[~2008-09-05 12:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-05 11:45 "Listenless" TCP over NAT? xerces8
2008-09-05 12:15 ` Ben Hutchings
2008-09-05 12:15 ` Evgeniy Polyakov [this message]
2008-09-05 12:51 ` Rémi Denis-Courmont
2008-09-05 14:26   ` xerces8

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080905121511.GA14016@2ka.mipt.ru \
    --to=johnpol@2ka.mipt.ru \
    --cc=linux-net@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=xerces8@butn.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).