|
-
Feb 19th, 2008, 09:06 PM
#1
Thread Starter
Addicted Member
Connect 2 Another PC thru internet.(vb.net 05)
Ive read other posts on this forum and beyond regarding Client and Server , however, they work well only if on a LAN network.
But for a connection, eg to a friends house, is it necessary to open ports? If yes, then is it possible to connect by simply providing the program/fucntion/routine with a target external ip , without the hassle of opening ports?
Last edited by Zapper; Feb 19th, 2008 at 09:12 PM.
-
Feb 20th, 2008, 03:22 AM
#2
Re: Connect 2 Another PC thru internet.(vb.net 05)
TCP communication is done the same way regardless of if the two endpoints reside in the same local network or not, so if you're experiencing troubles trying to communicate outside the LAN then yes, you probably need to forward some ports on your router.
-
Feb 20th, 2008, 03:55 AM
#3
Thread Starter
Addicted Member
Re: Connect 2 Another PC thru internet.(vb.net 05)
Then i just wonder why programs such as msn doesnt require the user to manually open ports?
-
Feb 24th, 2008, 12:43 PM
#4
Re: Connect 2 Another PC thru internet.(vb.net 05)
Some ports are open by default. You can use those, too, but you will need to be aware of the ramifications of using a port that has a commonly acknowledged purpose.
My usual boring signature: Nothing
 
-
Feb 24th, 2008, 09:01 PM
#5
Fanatic Member
Re: Connect 2 Another PC thru internet.(vb.net 05)
This should clear things up.
Most SOHO routers do not block outgoing traffic, only incoming. Why? Because of NAT (or Network Address Translation). NAT allows you to take 1 IP address (external), and 'share' it to many clients (internal LAN). And the router usually blocks incoming connections because it doesn't know where to send the packet (where to send it internally), so it just drops it. This is where you need to forward ports (or open) on the router telling the router "hey if a packet comes on this port; send the packet to this computer because its responsible for doing X". Now, you don't have to forward a port if it's on the LAN. Why? Because of NAT again. NAT knows your local network, and knows where everything should go.
Lets explore the question: Why don't you need to forward ports for MSN?
The simple reason, it is a client. And a client connects outward and doesn't need to listen for requests (thats a server, duh!). And, usually SOHO routers are designed to allow outgoing connections and to allow for communication back and forth between the client going out and the communication from the server. Now, to accomplish lets say, webcam hosting, you need to do something even more advanced. There is a protocol called UPnP (no not the PnP on your computers from like 1999! Man I feel old now....). With UPnP you can supposedly open ports on a router (at least according to what I have read) using network communication.
Lets explore another question: Why don't you need to forward ports for an application like GotoMyPC?
You had to bring that up didn't you!?
GotoMyPC works very simply. They are running a secure server, call it S1. And you are running a CLIENT (very important) on your computer, call it C1. C1 connects to S1 and stays connected. You goto work, you download and install the software. The computer at work is another client call it C2. C2 connects to S1, and tells S1 "hey move the mouse on my computer please". S1 then sends a packet to C1, saying "please move your mouse".
End of the story.
There are other 'magical' ways to accomplish client-server without forwarding ports, but this basic knowledge will get you started in regards to network programming. You will figure out more 'cool' things as you go along. 
P.S. I know my terminology isn't exact, but the concept is there.
-
Feb 24th, 2008, 10:03 PM
#6
Thread Starter
Addicted Member
Re: Connect 2 Another PC thru internet.(vb.net 05)
i kinda guess it was something like that, but didnt know for sure.
tyvm
-
Mar 13th, 2008, 03:52 AM
#7
New Member
Re: Connect 2 Another PC thru internet.(vb.net 05)
-
Mar 13th, 2008, 09:45 PM
#8
Thread Starter
Addicted Member
Re: Connect 2 Another PC thru internet.(vb.net 05)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|