Hey everyone,
i'm new here in this forum (as u can see, i guess) and i hope this is the right place for my question. Otherwise please tell me or move this thread.
So, now about my Problem.
I'm developing a program, where you can write messages between two workstations.
For that, i thought about having a tcp-socket or udp connection from one computer to another.
To connect both clients i connect them on a setted port higher than 1024, but this port must be forwarded on both routers when the clients try to connect to each other.
But i saw a few programs, where this does actually work without forwarding any ports by myself. For example any torrent-software, i guess they're all peer-to-peer, aren't they? Or Teamviewer, or maybe even icq, the server of icq must talk to the client, but u don't have to open any ports.
So my question is, how can i solve my Problem of connecting to Computers via WAN without any Port-forwarding?
Hope i could describe my Problem understandable and i'm really looking forward for some solutions, seems to be not a very complicated Problem, much programs working like that.
Greetings, Patwerk!
1 reply to this topic
#1
Posted 04 April 2011 - 01:07 AM
|
|
|
#2
Posted 04 April 2011 - 05:18 AM
ICQ, Teamspeak etc connect to a central server. Servers are not behind a NAT oder PAT and by this there is no need to "open" or forward a port. Other protocols like for example torrent need to connect to the client so i you ar in a private network and access internet via PAT (= IP Masquerading) you have to forward the port(s) to the correct machine. Some tools & router my support a protocol called "UPnP" and are able to make these settings on their own but this is an feature of just some routers and isn't available on every box.
For your problem, i see 3 "solutions":
1. try to implement UPnP and forward the ports if needed.
2. set up a central server to "forward" your messages.
3. use the good old port forwarding.
I think a combination of the first and die third would be quite nice. Alternativly you can wait for IPv6 to became the default. I don't believe that there will be PAT/NAT with IPv6 :D
For your problem, i see 3 "solutions":
1. try to implement UPnP and forward the ports if needed.
2. set up a central server to "forward" your messages.
3. use the good old port forwarding.
I think a combination of the first and die third would be quite nice. Alternativly you can wait for IPv6 to became the default. I don't believe that there will be PAT/NAT with IPv6 :D
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









