473,326 Members | 2,815 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Help! I can't find this info anywhere!

I have searched high and low (and even in some places I'd like to forget I
ever saw) for the information that will tell me exactly how the Nat2Nat
server for UltraVNC works (not just a vague diagram, but the code needed -
at least psuedocode - to connect the 2 clients) . (You can see it at
http://www.uvnc.com/addons/nat2nat.html.)

I get the diagram and all, but how exactly would you get 2 UDP connections
to your UDP server to start talking to each other instead of the server?

As I see it, the whole reason for the Nat2Nat server is to get 2 PCs that
can only make ooutgoing connections (because they are behind NATs) to
connect directly. If they have already connected to the UDP server and
cannot accept incoming connections, how do you get them connected directly
to each other and drop the Nat2Nat server from the loop?

What's the trick to this? Does anybody know?
Sep 30 '06 #1
12 1270
Seems to me that the Nat2Nat server would send the IP/Port of the opposite
client to each client. Then they would send further communiction directly to
the other client instead of going through the server.
"smerf" <sm***@shroom.comwrote in message
news:xS*******************@bignews8.bellsouth.net. ..
>I have searched high and low (and even in some places I'd like to forget I
ever saw) for the information that will tell me exactly how the Nat2Nat
server for UltraVNC works (not just a vague diagram, but the code needed -
at least psuedocode - to connect the 2 clients) . (You can see it at
http://www.uvnc.com/addons/nat2nat.html.)

I get the diagram and all, but how exactly would you get 2 UDP connections
to your UDP server to start talking to each other instead of the server?

As I see it, the whole reason for the Nat2Nat server is to get 2 PCs that
can only make ooutgoing connections (because they are behind NATs) to
connect directly. If they have already connected to the UDP server and
cannot accept incoming connections, how do you get them connected directly
to each other and drop the Nat2Nat server from the loop?

What's the trick to this? Does anybody know?


Sep 30 '06 #2
But how? When you write a server you can create addidtional sockets and use
one of them to accept an incoming connection on another port. But, I have
never seen a method of accepting an incoming connection on another IP
address.

Are you suggesting telling each PC to redirect to the client UDP ports
detected by the server? If so, wouldn't the connectionless nature of UDP be
a problem? Do firewalls and NATs keep UDP ports open to the same client or
so they simply choose another port at random for the next outgoing request?

"Terry Olsen" <to******@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Seems to me that the Nat2Nat server would send the IP/Port of the opposite
client to each client. Then they would send further communiction directly
to the other client instead of going through the server.
"smerf" <sm***@shroom.comwrote in message
news:xS*******************@bignews8.bellsouth.net. ..
>>I have searched high and low (and even in some places I'd like to forget I
ever saw) for the information that will tell me exactly how the Nat2Nat
server for UltraVNC works (not just a vague diagram, but the code needed -
at least psuedocode - to connect the 2 clients) . (You can see it at
http://www.uvnc.com/addons/nat2nat.html.)

I get the diagram and all, but how exactly would you get 2 UDP
connections to your UDP server to start talking to each other instead of
the server?

As I see it, the whole reason for the Nat2Nat server is to get 2 PCs that
can only make ooutgoing connections (because they are behind NATs) to
connect directly. If they have already connected to the UDP server and
cannot accept incoming connections, how do you get them connected
directly to each other and drop the Nat2Nat server from the loop?

What's the trick to this? Does anybody know?



Sep 30 '06 #3
Check out http://www.ambrosiasw.com/~fprefect/codewhore/nat2.html .

According to this, The NAT will most likely reject an incoming packet from
an IP that it did not send a packet to. That makes sense - but it is
problematic for my needs.
"Terry Olsen" <to******@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Seems to me that the Nat2Nat server would send the IP/Port of the opposite
client to each client. Then they would send further communiction directly
to the other client instead of going through the server.
"smerf" <sm***@shroom.comwrote in message
news:xS*******************@bignews8.bellsouth.net. ..
>>I have searched high and low (and even in some places I'd like to forget I
ever saw) for the information that will tell me exactly how the Nat2Nat
server for UltraVNC works (not just a vague diagram, but the code needed -
at least psuedocode - to connect the 2 clients) . (You can see it at
http://www.uvnc.com/addons/nat2nat.html.)

I get the diagram and all, but how exactly would you get 2 UDP
connections to your UDP server to start talking to each other instead of
the server?

As I see it, the whole reason for the Nat2Nat server is to get 2 PCs that
can only make ooutgoing connections (because they are behind NATs) to
connect directly. If they have already connected to the UDP server and
cannot accept incoming connections, how do you get them connected
directly to each other and drop the Nat2Nat server from the loop?

What's the trick to this? Does anybody know?



Sep 30 '06 #4
Hi,
As I see it, the whole reason for the Nat2Nat server is to get 2 PCs that can only make ooutgoing connections (because they are
behind NATs) to connect directly.
How can they connect directly to each other if they can only make outgoing connections? In other words, if they won't accept
incoming connections then you're stuck connecting through a server.

HTH

--
Dave Sexton

"smerf" <sm***@shroom.comwrote in message news:xS*******************@bignews8.bellsouth.net. ..
>I have searched high and low (and even in some places I'd like to forget I ever saw) for the information that will tell me exactly
how the Nat2Nat server for UltraVNC works (not just a vague diagram, but the code needed - at least psuedocode - to connect the 2
clients) . (You can see it at http://www.uvnc.com/addons/nat2nat.html.)

I get the diagram and all, but how exactly would you get 2 UDP connections to your UDP server to start talking to each other
instead of the server?

As I see it, the whole reason for the Nat2Nat server is to get 2 PCs that can only make ooutgoing connections (because they are
behind NATs) to connect directly. If they have already connected to the UDP server and cannot accept incoming connections, how do
you get them connected directly to each other and drop the Nat2Nat server from the loop?

What's the trick to this? Does anybody know?


Sep 30 '06 #5
I'm just guessing here, I haven't tried anything like this myself, but...

When your client receives the IP/Port of the other client, wouldn't it then
send a fake packet out to the other client just to open up the port for the
other client's IP address?

I'm not claiming to know anything here, just guessing...but to me it seems
logical :)
"smerf" <sm***@shroom.comwrote in message
news:K3******************@bignews3.bellsouth.net.. .
But how? When you write a server you can create addidtional sockets and
use one of them to accept an incoming connection on another port. But, I
have never seen a method of accepting an incoming connection on another IP
address.

Are you suggesting telling each PC to redirect to the client UDP ports
detected by the server? If so, wouldn't the connectionless nature of UDP
be a problem? Do firewalls and NATs keep UDP ports open to the same
client or so they simply choose another port at random for the next
outgoing request?

"Terry Olsen" <to******@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>Seems to me that the Nat2Nat server would send the IP/Port of the
opposite client to each client. Then they would send further communiction
directly to the other client instead of going through the server.
"smerf" <sm***@shroom.comwrote in message
news:xS*******************@bignews8.bellsouth.net ...
>>>I have searched high and low (and even in some places I'd like to forget
I ever saw) for the information that will tell me exactly how the Nat2Nat
server for UltraVNC works (not just a vague diagram, but the code
needed - at least psuedocode - to connect the 2 clients) . (You can see
it at http://www.uvnc.com/addons/nat2nat.html.)

I get the diagram and all, but how exactly would you get 2 UDP
connections to your UDP server to start talking to each other instead of
the server?

As I see it, the whole reason for the Nat2Nat server is to get 2 PCs
that can only make ooutgoing connections (because they are behind NATs)
to connect directly. If they have already connected to the UDP server
and cannot accept incoming connections, how do you get them connected
directly to each other and drop the Nat2Nat server from the loop?

What's the trick to this? Does anybody know?




Sep 30 '06 #6
That IS the question. How indeed...

But, UltraVNC claims to do this...many games use this same P2P connection
protocol to tunnel through firewalls (or so I have read). I just can't find
out how it is being done so that I can enable my apps in a similar fashion.

"Dave Sexton" <dave@jwa[remove.this]online.comwrote in message
news:O$**************@TK2MSFTNGP05.phx.gbl...
Hi,
>As I see it, the whole reason for the Nat2Nat server is to get 2 PCs that
can only make ooutgoing connections (because they are behind NATs) to
connect directly.

How can they connect directly to each other if they can only make outgoing
connections? In other words, if they won't accept incoming connections
then you're stuck connecting through a server.

HTH

--
Dave Sexton

"smerf" <sm***@shroom.comwrote in message
news:xS*******************@bignews8.bellsouth.net. ..
>>I have searched high and low (and even in some places I'd like to forget I
ever saw) for the information that will tell me exactly how the Nat2Nat
server for UltraVNC works (not just a vague diagram, but the code needed -
at least psuedocode - to connect the 2 clients) . (You can see it at
http://www.uvnc.com/addons/nat2nat.html.)

I get the diagram and all, but how exactly would you get 2 UDP
connections to your UDP server to start talking to each other instead of
the server?

As I see it, the whole reason for the Nat2Nat server is to get 2 PCs that
can only make ooutgoing connections (because they are behind NATs) to
connect directly. If they have already connected to the UDP server and
cannot accept incoming connections, how do you get them connected
directly to each other and drop the Nat2Nat server from the loop?

What's the trick to this? Does anybody know?



Sep 30 '06 #7
That makes sense initially.

But, consider this.... Client 1 connects to Nat2Nat Server to say "I'm
here!" and to get the IP/Port of Client 2. In order to get this primary
connection and data from the Nat2Nat Server, Client 1's NAT puts an entry in
the NAT IP table that indicates the Nat2Nat Server is the external endpoint.
If a packet comes in to Client 1's NAT with a different external endpoint
than is written in the NATs IP table, Client 1's NAT won't know which of its
clients the packet is for and will drop it.

And, how do you rewrite the UDP header info when establishing a connection?
"Terry Olsen" <to******@hotmail.comwrote in message
news:Oi**************@TK2MSFTNGP03.phx.gbl...
I'm just guessing here, I haven't tried anything like this myself, but...

When your client receives the IP/Port of the other client, wouldn't it
then send a fake packet out to the other client just to open up the port
for the other client's IP address?

I'm not claiming to know anything here, just guessing...but to me it seems
logical :)
"smerf" <sm***@shroom.comwrote in message
news:K3******************@bignews3.bellsouth.net.. .
>But how? When you write a server you can create addidtional sockets and
use one of them to accept an incoming connection on another port. But, I
have never seen a method of accepting an incoming connection on another
IP address.

Are you suggesting telling each PC to redirect to the client UDP ports
detected by the server? If so, wouldn't the connectionless nature of UDP
be a problem? Do firewalls and NATs keep UDP ports open to the same
client or so they simply choose another port at random for the next
outgoing request?

"Terry Olsen" <to******@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>>Seems to me that the Nat2Nat server would send the IP/Port of the
opposite client to each client. Then they would send further
communiction directly to the other client instead of going through the
server.
"smerf" <sm***@shroom.comwrote in message
news:xS*******************@bignews8.bellsouth.ne t...
I have searched high and low (and even in some places I'd like to forget
I ever saw) for the information that will tell me exactly how the
Nat2Nat server for UltraVNC works (not just a vague diagram, but the
code needed - at least psuedocode - to connect the 2 clients) . (You
can see it at http://www.uvnc.com/addons/nat2nat.html.)

I get the diagram and all, but how exactly would you get 2 UDP
connections to your UDP server to start talking to each other instead
of the server?

As I see it, the whole reason for the Nat2Nat server is to get 2 PCs
that can only make ooutgoing connections (because they are behind NATs)
to connect directly. If they have already connected to the UDP server
and cannot accept incoming connections, how do you get them connected
directly to each other and drop the Nat2Nat server from the loop?

What's the trick to this? Does anybody know?




Sep 30 '06 #8
Of course it will drop the "dummy" packet. The client that sent the dummy
packet only did that to open up its own port to receive packets from the
other clients IP address. The other client would send out its own "dummy"
packet to open up its port also. If you initiate communication with a
remote end point, then you open up the port for that end point to talk back.

"smerf" <sm***@shroom.comwrote in message
news:yx******************@bignews3.bellsouth.net.. .
That makes sense initially.

But, consider this.... Client 1 connects to Nat2Nat Server to say "I'm
here!" and to get the IP/Port of Client 2. In order to get this primary
connection and data from the Nat2Nat Server, Client 1's NAT puts an entry
in the NAT IP table that indicates the Nat2Nat Server is the external
endpoint. If a packet comes in to Client 1's NAT with a different external
endpoint than is written in the NATs IP table, Client 1's NAT won't know
which of its clients the packet is for and will drop it.

And, how do you rewrite the UDP header info when establishing a
connection?
"Terry Olsen" <to******@hotmail.comwrote in message
news:Oi**************@TK2MSFTNGP03.phx.gbl...
>I'm just guessing here, I haven't tried anything like this myself, but...

When your client receives the IP/Port of the other client, wouldn't it
then send a fake packet out to the other client just to open up the port
for the other client's IP address?

I'm not claiming to know anything here, just guessing...but to me it
seems logical :)
"smerf" <sm***@shroom.comwrote in message
news:K3******************@bignews3.bellsouth.net. ..
>>But how? When you write a server you can create addidtional sockets and
use one of them to accept an incoming connection on another port. But,
I have never seen a method of accepting an incoming connection on
another IP address.

Are you suggesting telling each PC to redirect to the client UDP ports
detected by the server? If so, wouldn't the connectionless nature of
UDP be a problem? Do firewalls and NATs keep UDP ports open to the same
client or so they simply choose another port at random for the next
outgoing request?

"Terry Olsen" <to******@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl.. .
Seems to me that the Nat2Nat server would send the IP/Port of the
opposite client to each client. Then they would send further
communiction directly to the other client instead of going through the
server.
"smerf" <sm***@shroom.comwrote in message
news:xS*******************@bignews8.bellsouth.n et...
>I have searched high and low (and even in some places I'd like to
>forget I ever saw) for the information that will tell me exactly how
>the Nat2Nat server for UltraVNC works (not just a vague diagram, but
>the code needed - at least psuedocode - to connect the 2 clients) .
>(You can see it at http://www.uvnc.com/addons/nat2nat.html.)
>
I get the diagram and all, but how exactly would you get 2 UDP
connections to your UDP server to start talking to each other instead
of the server?
>
As I see it, the whole reason for the Nat2Nat server is to get 2 PCs
that can only make ooutgoing connections (because they are behind
NATs) to connect directly. If they have already connected to the UDP
server and cannot accept incoming connections, how do you get them
connected directly to each other and drop the Nat2Nat server from the
loop?
>
What's the trick to this? Does anybody know?
>
>




Sep 30 '06 #9
I understand...but.....

For you to open an endpoint to a NATed client using a "dummy" packet, you
must first know what port the NAT has given the other client's endpoint.
Without that info, what "dummy" data could you use to create the UDP
connection?

The originating endpoint is not aware of the external Port/IP assigned to it
by the NAT. The only way to get this info is from the endpoint that accepts
the connection (the Nat2Nat server). But, once that is done, the NAT has
now the Nat2Nat server in its ip tables as the endpoint for the originating
client's UDP communications.

"Terry Olsen" <to******@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Of course it will drop the "dummy" packet. The client that sent the dummy
packet only did that to open up its own port to receive packets from the
other clients IP address. The other client would send out its own "dummy"
packet to open up its port also. If you initiate communication with a
remote end point, then you open up the port for that end point to talk
back.

"smerf" <sm***@shroom.comwrote in message
news:yx******************@bignews3.bellsouth.net.. .
>That makes sense initially.

But, consider this.... Client 1 connects to Nat2Nat Server to say "I'm
here!" and to get the IP/Port of Client 2. In order to get this primary
connection and data from the Nat2Nat Server, Client 1's NAT puts an entry
in the NAT IP table that indicates the Nat2Nat Server is the external
endpoint. If a packet comes in to Client 1's NAT with a different
external endpoint than is written in the NATs IP table, Client 1's NAT
won't know which of its clients the packet is for and will drop it.

And, how do you rewrite the UDP header info when establishing a
connection?
"Terry Olsen" <to******@hotmail.comwrote in message
news:Oi**************@TK2MSFTNGP03.phx.gbl...
>>I'm just guessing here, I haven't tried anything like this myself,
but...

When your client receives the IP/Port of the other client, wouldn't it
then send a fake packet out to the other client just to open up the port
for the other client's IP address?

I'm not claiming to know anything here, just guessing...but to me it
seems logical :)
"smerf" <sm***@shroom.comwrote in message
news:K3******************@bignews3.bellsouth.net ...
But how? When you write a server you can create addidtional sockets
and use one of them to accept an incoming connection on another port.
But, I have never seen a method of accepting an incoming connection on
another IP address.

Are you suggesting telling each PC to redirect to the client UDP ports
detected by the server? If so, wouldn't the connectionless nature of
UDP be a problem? Do firewalls and NATs keep UDP ports open to the
same client or so they simply choose another port at random for the
next outgoing request?

"Terry Olsen" <to******@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl. ..
Seems to me that the Nat2Nat server would send the IP/Port of the
opposite client to each client. Then they would send further
communiction directly to the other client instead of going through the
server.
>
>
"smerf" <sm***@shroom.comwrote in message
news:xS*******************@bignews8.bellsouth. net...
>>I have searched high and low (and even in some places I'd like to
>>forget I ever saw) for the information that will tell me exactly how
>>the Nat2Nat server for UltraVNC works (not just a vague diagram, but
>>the code needed - at least psuedocode - to connect the 2 clients) .
>>(You can see it at http://www.uvnc.com/addons/nat2nat.html.)
>>
>I get the diagram and all, but how exactly would you get 2 UDP
>connections to your UDP server to start talking to each other instead
>of the server?
>>
>As I see it, the whole reason for the Nat2Nat server is to get 2 PCs
>that can only make ooutgoing connections (because they are behind
>NATs) to connect directly. If they have already connected to the UDP
>server and cannot accept incoming connections, how do you get them
>connected directly to each other and drop the Nat2Nat server from the
>loop?
>>
>What's the trick to this? Does anybody know?
>>
>>
>
>




Sep 30 '06 #10
This is like some F'ing Twilight Zone episode!

I finally find a site that may have some people familiar with this problem
(gamedev.net) and immediately after I register for their forums, the site
goes down.

F'ing incredible!
"smerf" <sm***@shroom.comwrote in message
news:9S*******************@bignews3.bellsouth.net. ..
>I understand...but.....

For you to open an endpoint to a NATed client using a "dummy" packet, you
must first know what port the NAT has given the other client's endpoint.
Without that info, what "dummy" data could you use to create the UDP
connection?

The originating endpoint is not aware of the external Port/IP assigned to
it by the NAT. The only way to get this info is from the endpoint that
accepts the connection (the Nat2Nat server). But, once that is done, the
NAT has now the Nat2Nat server in its ip tables as the endpoint for the
originating client's UDP communications.

"Terry Olsen" <to******@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>Of course it will drop the "dummy" packet. The client that sent the dummy
packet only did that to open up its own port to receive packets from the
other clients IP address. The other client would send out its own
"dummy" packet to open up its port also. If you initiate communication
with a remote end point, then you open up the port for that end point to
talk back.

"smerf" <sm***@shroom.comwrote in message
news:yx******************@bignews3.bellsouth.net. ..
>>That makes sense initially.

But, consider this.... Client 1 connects to Nat2Nat Server to say "I'm
here!" and to get the IP/Port of Client 2. In order to get this primary
connection and data from the Nat2Nat Server, Client 1's NAT puts an
entry in the NAT IP table that indicates the Nat2Nat Server is the
external endpoint. If a packet comes in to Client 1's NAT with a
different external endpoint than is written in the NATs IP table, Client
1's NAT won't know which of its clients the packet is for and will drop
it.

And, how do you rewrite the UDP header info when establishing a
connection?
"Terry Olsen" <to******@hotmail.comwrote in message
news:Oi**************@TK2MSFTNGP03.phx.gbl...
I'm just guessing here, I haven't tried anything like this myself,
but...

When your client receives the IP/Port of the other client, wouldn't it
then send a fake packet out to the other client just to open up the
port for the other client's IP address?

I'm not claiming to know anything here, just guessing...but to me it
seems logical :)
"smerf" <sm***@shroom.comwrote in message
news:K3******************@bignews3.bellsouth.ne t...
But how? When you write a server you can create addidtional sockets
and use one of them to accept an incoming connection on another port.
But, I have never seen a method of accepting an incoming connection on
another IP address.
>
Are you suggesting telling each PC to redirect to the client UDP ports
detected by the server? If so, wouldn't the connectionless nature of
UDP be a problem? Do firewalls and NATs keep UDP ports open to the
same client or so they simply choose another port at random for the
next outgoing request?
>
>
>
"Terry Olsen" <to******@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl.. .
>Seems to me that the Nat2Nat server would send the IP/Port of the
>opposite client to each client. Then they would send further
>communiction directly to the other client instead of going through
>the server.
>>
>>
>"smerf" <sm***@shroom.comwrote in message
>news:xS*******************@bignews8.bellsouth .net...
>>>I have searched high and low (and even in some places I'd like to
>>>forget I ever saw) for the information that will tell me exactly how
>>>the Nat2Nat server for UltraVNC works (not just a vague diagram, but
>>>the code needed - at least psuedocode - to connect the 2 clients) .
>>>(You can see it at http://www.uvnc.com/addons/nat2nat.html.)
>>>
>>I get the diagram and all, but how exactly would you get 2 UDP
>>connections to your UDP server to start talking to each other
>>instead of the server?
>>>
>>As I see it, the whole reason for the Nat2Nat server is to get 2 PCs
>>that can only make ooutgoing connections (because they are behind
>>NATs) to connect directly. If they have already connected to the
>>UDP server and cannot accept incoming connections, how do you get
>>them connected directly to each other and drop the Nat2Nat server
>>from the loop?
>>>
>>What's the trick to this? Does anybody know?
>>>
>>>
>>
>>
>
>




Sep 30 '06 #11
Hi,

My question was rhetorical. Unfortunately it's hard to express two things in newsgroups: Rhetorical questions and sarcasm. I'll
try to abstain from using both from now on :)

There is no way around having to connect through an external server when incoming connections are blocked.

If you have software running on each client machine then they both must connect to a remote server. Then, the remote server can
respond with the port that one client must open to listen for incoming connections and that the other client must use to connect
(obviously the IP must be sent as well to the latter client). The first client essentially becomes the server.

It appears that the diagram from the link in your OP already illustrates what I've stated here, somewhat. If you already have that
software then you should refer to its documentation to figure out how it works and the configuration you'll need on your LAN
hardware and PC's.

You can only use a remote server to establish a connection between two clients if:

1. The client software has the ability to listen for incoming connections on the port specified by the server
2. The external router will route incoming packets to the client
3. No firewall, external or internal, will block packets on the incoming port (I think UPnP can be used to open the required ports
programmatically)
(Have I forgotten anything important?)

I don't think the protocol, such as UDP or TCP, actually matters.

Trying to trick the client computer into opening up a port (it seems your other posts are heading in that direction) doesn't sound
like a good idea to me. Network address spoofing sounds like a bad idea too.

--
Dave Sexton

"smerf" <sm***@shroom.comwrote in message news:4o*****************@bignews3.bellsouth.net...
That IS the question. How indeed...

But, UltraVNC claims to do this...many games use this same P2P connection protocol to tunnel through firewalls (or so I have
read). I just can't find out how it is being done so that I can enable my apps in a similar fashion.

"Dave Sexton" <dave@jwa[remove.this]online.comwrote in message news:O$**************@TK2MSFTNGP05.phx.gbl...
>Hi,
>>As I see it, the whole reason for the Nat2Nat server is to get 2 PCs that can only make ooutgoing connections (because they are
behind NATs) to connect directly.

How can they connect directly to each other if they can only make outgoing connections? In other words, if they won't accept
incoming connections then you're stuck connecting through a server.

HTH

--
Dave Sexton

"smerf" <sm***@shroom.comwrote in message news:xS*******************@bignews8.bellsouth.net. ..
>>>I have searched high and low (and even in some places I'd like to forget I ever saw) for the information that will tell me
exactly how the Nat2Nat server for UltraVNC works (not just a vague diagram, but the code needed - at least psuedocode - to
connect the 2 clients) . (You can see it at http://www.uvnc.com/addons/nat2nat.html.)

I get the diagram and all, but how exactly would you get 2 UDP connections to your UDP server to start talking to each other
instead of the server?

As I see it, the whole reason for the Nat2Nat server is to get 2 PCs that can only make ooutgoing connections (because they are
behind NATs) to connect directly. If they have already connected to the UDP server and cannot accept incoming connections, how
do you get them connected directly to each other and drop the Nat2Nat server from the loop?

What's the trick to this? Does anybody know?




Sep 30 '06 #12

"smerf" <sm***@shroom.comwrote in message
news:9S*******************@bignews3.bellsouth.net. ..
>I understand...but.....

For you to open an endpoint to a NATed client using a "dummy" packet, you
must first know what port the NAT has given the other client's endpoint.
Without that info, what "dummy" data could you use to create the UDP
connection?

The originating endpoint is not aware of the external Port/IP assigned to
it by the NAT. The only way to get this info is from the endpoint that
accepts the connection (the Nat2Nat server). But, once that is done, the
NAT has now the Nat2Nat server in its ip tables as the endpoint for the
originating client's UDP communications.
You're operating under the mistaken impression that the NAT mapping depends
on the outside IP address. It doesn't. It's the local node's private IP
address that gets associated to the port number so the NAT router can
correctly rewrite incoming packets. For outgoing packets, the sender has
already put the correct public IP address of the recipient into the packet,
no translation is needed.

There may be a limitation to accepting "return" packets from a IP you've
already sent to, this would be on routers that advertise "stateful packet
inspection firewall", and that's the purpose of sending the dummy outgoing
packet -- to get registered in the router as a permitted connection,
initiated from inside.
>
"Terry Olsen" <to******@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>Of course it will drop the "dummy" packet. The client that sent the dummy
packet only did that to open up its own port to receive packets from the
other clients IP address. The other client would send out its own
"dummy" packet to open up its port also. If you initiate communication
with a remote end point, then you open up the port for that end point to
talk back.

"smerf" <sm***@shroom.comwrote in message
news:yx******************@bignews3.bellsouth.net. ..
>>That makes sense initially.

But, consider this.... Client 1 connects to Nat2Nat Server to say "I'm
here!" and to get the IP/Port of Client 2. In order to get this primary
connection and data from the Nat2Nat Server, Client 1's NAT puts an
entry in the NAT IP table that indicates the Nat2Nat Server is the
external endpoint. If a packet comes in to Client 1's NAT with a
different external endpoint than is written in the NATs IP table, Client
1's NAT won't know which of its clients the packet is for and will drop
it.

And, how do you rewrite the UDP header info when establishing a
connection?
"Terry Olsen" <to******@hotmail.comwrote in message
news:Oi**************@TK2MSFTNGP03.phx.gbl...
I'm just guessing here, I haven't tried anything like this myself,
but...

When your client receives the IP/Port of the other client, wouldn't it
then send a fake packet out to the other client just to open up the
port for the other client's IP address?

I'm not claiming to know anything here, just guessing...but to me it
seems logical :)
"smerf" <sm***@shroom.comwrote in message
news:K3******************@bignews3.bellsouth.ne t...
But how? When you write a server you can create addidtional sockets
and use one of them to accept an incoming connection on another port.
But, I have never seen a method of accepting an incoming connection on
another IP address.
>
Are you suggesting telling each PC to redirect to the client UDP ports
detected by the server? If so, wouldn't the connectionless nature of
UDP be a problem? Do firewalls and NATs keep UDP ports open to the
same client or so they simply choose another port at random for the
next outgoing request?
>
>
>
"Terry Olsen" <to******@hotmail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl.. .
>Seems to me that the Nat2Nat server would send the IP/Port of the
>opposite client to each client. Then they would send further
>communiction directly to the other client instead of going through
>the server.
>>
>>
>"smerf" <sm***@shroom.comwrote in message
>news:xS*******************@bignews8.bellsouth .net...
>>>I have searched high and low (and even in some places I'd like to
>>>forget I ever saw) for the information that will tell me exactly how
>>>the Nat2Nat server for UltraVNC works (not just a vague diagram, but
>>>the code needed - at least psuedocode - to connect the 2 clients) .
>>>(You can see it at http://www.uvnc.com/addons/nat2nat.html.)
>>>
>>I get the diagram and all, but how exactly would you get 2 UDP
>>connections to your UDP server to start talking to each other
>>instead of the server?
>>>
>>As I see it, the whole reason for the Nat2Nat server is to get 2 PCs
>>that can only make ooutgoing connections (because they are behind
>>NATs) to connect directly. If they have already connected to the
>>UDP server and cannot accept incoming connections, how do you get
>>them connected directly to each other and drop the Nat2Nat server
>>from the loop?
>>>
>>What's the trick to this? Does anybody know?
>>>
>>>
>>
>>
>
>




Oct 10 '06 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Dave | last post by:
After following Microsofts admonition to reformat my system before doing a final compilation of my app I got many warnings/errors upon compiling an rtf file created in word. I used the Help...
11
by: Helmut Jarausch | last post by:
Hi, entering help('rstrip') or help('ljust') into IDLE's shell window I only get no Python documentation found ...
4
by: Sarir Khamsi | last post by:
Is there a way to get help the way you get it from the Python interpreter (eg, 'help(dir)' gives help on the 'dir' command) in the module cmd.Cmd? I know how to add commands and help text to...
0
by: Tim21 | last post by:
OK, im miserable :)) so.. help'd b highly appreciated. Situation: Win XP aplication server RUNTIME (stored fmx files along with the ..hlp files) Fmx's generated and compiled on development...
5
by: Craig Keightley | last post by:
Please help, i have attached my page which worksin IE but i cannnot get the drop down menu to fucntion in firefox. Any one have any ideas why? Many Thanks Craig ...
3
by: Colin J. Williams | last post by:
Python advertises some basic service: C:\Python24>python Python 2.4.1 (#65, Mar 30 2005, 09:13:57) on win32 Type "help", "copyright", "credits" or "license" for more information. >>> With...
1
by: Tim Marshall | last post by:
I'm putting together my first help file (using Easy Help, http://www.easyhelp.com/). So far, so good. I'm able to use the Help File and Help Context ID to have things from my help file pop up...
3
by: stuart_white_ | last post by:
I've just upgraded from Python 2.3.3 to Python 2.4.2, and, although the new version of Python seems to be running correctly, I can't seem access the help from the interpreter. On Python 2.3.3...
9
by: JJ | last post by:
Do you all use HTML help workshop to create your help system. I am finding it quite clumsy to use. Mayeb because I am not used to using it. Do any of you use any other techniques to create help...
1
by: trunxnirvana007 | last post by:
'UPGRADE_WARNING: Array has a new behavior. Click for more: 'ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?keyword="9B7D5ADD-D8FE-4819-A36C-6DEDAF088CC7"' 'UPGRADE_WARNING: Couldn't resolve...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.