twk
twk

Reputation: 17320

What are the best options for NAT port forwarding?

I'd like to make it easy for users to forward a port on their NAT to their local machine for my C++ app. I'd like to make this work on OSX & Windows. Linux would be a great bonus, but Linux users are probably more comfortable forwarding ports manually, so it is less of a concern. LGPL type code is OK, but I can't use anything that is straight GPL.

I'd love to hear any thoughts or experiences anyone has had in this area, but a few specific questions come to mind:

Upvotes: 7

Views: 2318

Answers (2)

andrewtj
andrewtj

Reputation: 326

Bonjour on both OS X and Windows can be used to do port mappings with routers that support uPNP or NAT-PMP. I haven't used the API (DNSServiceNATPortMappingCreate) but I have successfully published wide-area services on both Windows and OS X behind a NAT-PMP router. I'm not sure if your Windows users will want to install Bonjour (although they may already have it if they use iTunes or Safari) to use your app but on OS X support shouldn't be an issue.

Upvotes: 0

Mike F
Mike F

Reputation:

MiniUPNP is used by at least one bittorrent client (Transmission) and should work fine.

Upvotes: 2

Related Questions