Send a open port request to router

929 views Asked by At

I am creating a peer to peer application in c sharp, I was wondering if it was possible to send a request to the other persons router over the internet and ask it to open port 1234, or if there is any other way of uploading and sending data without port forwarding, or even an application that i can port forward my router via command line or dll would be great. Please help me for this is making me frustrated.

1

There are 1 answers

0
Andrei Tătar On

There is no way for an outside app to tell a router to open a port to one of its local machines. This would be a huge security hole.

If a local machine wants access from outside, it could use UPnP (NAT Traversal) to tell the router to forward a port to it (or you could simply configure your router to forward the port).

If both peers are behind NAT with no access to port forwarding, you would have to use some 3rd party server that proxies the data.