<HTML><BODY><p style="margin-top: 0px;" dir="ltr">Yes Dimitris!</p>
<div id="mail-app-auto-default-signature">
<p dir="ltr">--<br> Thanks<br> Brian G</p>
</div>Tuesday, 01 June 2021, 05:32PM -07:00 from Dimitris Anogiatis <a href="mailto:dosida@gmail.com">dosida@gmail.com</a>:<br><br><blockquote id="mail-app-auto-quote" cite="16225939260000039801" style="border-left:1px solid #0878BD; margin:0px 0px 0px 10px; padding:0px 0px 0px 10px;">
<div class="js-helper js-readmsg-msg">
<style type="text/css"></style>
<div >
<base target="_self" href="https://e-aj.my.com/" />
<div id="style_16225939260000039801_BODY"><div class="cl_610532"><div dir="ltr">Brian G,<br><br>A silly question. So in essence is hole punching just basically using an external server S to connect two clients A and B without doing port forwarding on each other's router?</div><br><div class="mail-quote-collapse"><div class="gmail_quote_mr_css_attr"><div dir="ltr" class="gmail_attr_mr_css_attr">On Tue, Jun 1, 2021 at 5:28 PM Brian G <<a href="mailto:brian@westwoodsvcs.com" target="_blank" rel=" noopener noreferrer" >brian@westwoodsvcs.com</a>> wrote:<br></div><blockquote class="gmail_quote_mr_css_attr" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I thought the nat took care of that..<br>
<br>
Flow:<br>
<br>
A and B each begin a UDP conversation with S; the NAT devices NA and NB create UDP translation states and assign temporary external port numbers EPA and EPB.<br>
<br>
S examines the UDP packets to get the source port used by NA and NB (the external NAT ports EPA and EPB).<br>
<br>
S passes EIPA:EPA to B and EIPB:EPB to A.<br>
<br>
A sends a packet to EIPB:EPB.<br>
<br>
NA examines A's packet and creates the following tuple in its translation table: (Source-IP-A, EPA, EIPB, EPB).<br>
<br>
B sends a packet to EIPA:EPA.<br>
<br>
NB examines B's packet and creates the following tuple in its translation table: (Source-IP-B, EPB, EIPA, EPA).<br>
<br>
Depending on the state of NA's translation table when B's first packet arrives <br>
  (i.e. whether the tuple (Source-IP-A, EPA, EIPB, EPB) has been created by the time of arrival of B's first packet),<br>
  B's first packet is dropped (no entry in translation table) or passed (entry in translation table has been made).<br>
<br>
Depending on the state of NB's translation table when A's first packet arrives<br>
  (i.e. whether the tuple (Source-IP-B, EPB, EIPA, EPA) has been created by the time of arrival of A's first packet),<br>
  A's first packet is dropped (no entry in translation table) or passed (entry in translation table has been made).<br>
<br>
At worst, the second packet from A reaches B; at worst the second packet from B reaches A. <br>
  Holes have been "punched" in the NAT and both hosts can directly communicate.<br>
<br>
<br>
From this it looks like your app get a message from S the go between containing the ip and port and then creates an outbound connection to the other host<br>
looks like you just need to read s's message and create a new udp connection to B.<br>
<br>
Maybe I am just miss reading or don't get what you are doing.<br>
<br>
Do you have a sample program?<br>
<br>
"Failure is the key to success; <br>
 each mistake teaches us something" .. Morihei Ueshiba<br>
Brian G<br>
<br>
----- On Jun 1, 2021, at 10:43 AM, Mayost Sharon <a href="mailto:sharon@455.co.il" target="_blank" rel=" noopener noreferrer" >sharon@455.co.il</a> wrote:<br>
<br>
> Hello to you<br>
> <br>
> Can it be done:<br>
> UDP hole punching<br>
> Through:<br>
> <a href="http://gb.net" target="_blank" rel=" noopener noreferrer" >gb.net</a><br>
> <br>
> I understand that I need to change:<br>
> UdpSocket.SourceHost and UdpSocket.SourcePort<br>
> And they are for reading only<br>
> They cannot be changed<br>
> <br>
> Is there another way to perform: UDP hole punching<br>
> <br>
> Thank you<br>
> <br>
> ----[ <a href="http://gambaswiki.org/wiki/doc/netiquette" target="_blank" rel=" noopener noreferrer" >http://gambaswiki.org/wiki/doc/netiquette</a> ]----<br>
<br>
----[ <a href="http://gambaswiki.org/wiki/doc/netiquette" target="_blank" rel=" noopener noreferrer" >http://gambaswiki.org/wiki/doc/netiquette</a> ]----<br>
</blockquote></div></div>
</div></div>
<div><br>
----[ <a href="http://gambaswiki.org/wiki/doc/netiquette" target="_blank" >http://gambaswiki.org/wiki/doc/netiquette</a> ]----<br>
<br>
</div>
<base target="_self" href="https://e-aj.my.com/" />
</div>
</div>
</blockquote></BODY></HTML>