[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Send data using tcp/udp to devices behind NAT - UDP Hole Punching
- From: Satheesh Kumar <satheeshrulzz@...>
- Date: Fri, 24 Feb 2012 10:53:42 +0530
So as I said earlier, I need a pure Lua implementation.
Are there any pure Lua implementations for Nat traversal. If no, then which is the best(and easiest) method which I can try to implement.
On Fri, Feb 24, 2012 at 10:42 AM, Ross Bencina <email@example.com>
On 24/02/2012 1:31 PM, Satheesh Kumar wrote:
Basically what I want need is this:
Two devices must connect and send data to one another(without an
external server) using tcp/udp.
The devices are behind NAT.
I read that this may be possible using a method called UDP Hole Punching.
So how do I achieve this? I have a server (seems hole punching requires
a server) but the actual data transfer must be without using an external
Any help is appreciated.
Another name for "Nat Hole Punching" is "Nat Traversal", you'll find many links with a google search on that. E.g. lots of info here:
I havn't implemented this is Lua, but I have in other systems. You should be able to implement this with any API that gives you full control over the UDP socket (ability to bind the local port as well as set the remote port, maybe that's not even needed).
You will have varying success with the various protocols, depending on the routers. Some forms of NAT cannot be punched.