netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rémi Denis-Courmont" <rdenis@simphalempin.com>
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, 05 Sep 2008 14:51:17 +0200	[thread overview]
Message-ID: <5f1c7b80099fb4aa3ad56e830aa525d1@chewa.net> (raw)
In-Reply-To: <WorldClient-F200809051345.AA45130148@butn.net>


On Fri, 05 Sep 2008 13:45:13 +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.
>
> My question: Can this be used to establish a TCP connection between two
> hosts that are both behind a (P)NAT router ?

Linux TCP/IP does allow this at the end nodes.

However, whether it works on the NAT model. Many NAPT and firewalling boxes
will reset the TCP session if you try to do TCP simultaneous open. Besides,
you need to be able to predict your source port number, which again is not
always possible depending on the NAPT implementation.


As far as I can tell, this is simply way too failure prone in real life.
Using some form of UDP encapsulation, such as ICE, Teredo, IPsec-in-UDP,
etc works A LOT better, although not always either.

--
Rémi Denis-Courmont


  parent reply	other threads:[~2008-09-05 12:51 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
2008-09-05 12:51 ` Rémi Denis-Courmont [this message]
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=5f1c7b80099fb4aa3ad56e830aa525d1@chewa.net \
    --to=rdenis@simphalempin.com \
    --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).