I am thinking about writing a client server app using sockets in c#. My question is, if the server is behind a router and upnp is enabled, once the server starts listening does upnp automatically forward data incoming to that computer if it is destined for said port? I don't want the user to have to start forwarding ports, I am hoping my server app can be zero configuration. Thanks in advance.
Asked
Active
Viewed 931 times
1 Answers
1
I worked on a uPNP tool a little while ago for a work application for file sharing across multiple sites.
I can confirm that during the port configuration via uPNP, that you do indeed specify which port and end point you would like to listen.
If uPNP reports back OK. All requests to the port will be forwarded to the passed end point.
I will find the class I made \ modified and give it as an example shortly....

Matthew Dunn
- 110
- 1
- 7
-
Sorry, So to answer your question. No, simply listening on a port does not register the port forward with your uPNP enabled router. – Matthew Dunn Jun 19 '11 at 04:42
-
http://pietschsoft.com/post/2009/02/05/NET-Framework-Communicate-through-NAT-Router-via-UPnP.aspx – Matthew Dunn Jun 19 '11 at 05:57
-
no need to post comments. Just edit your answer to include the new info. – dandan78 Jun 19 '11 at 10:21