Question pc to pc communication with Server/Client

kzdev

Member
Joined
Jan 3, 2010
Messages
6
Programming Experience
3-5
I use Microsoft Visual Basic 2008 Express Edition and I am begginer in computer networks.

I want to make two PCs communicate via network using server/client

I followed the example from this site: VB.NET TCP Client/Server Socket Commmunications

When I run the applications server and client in one computer then is possible the client to connect with server.

When I use two computers via network, in the first computer I run the server application and in the second computer the client application then the client it gives me error message like:

No connection could be made because the target machine actively refused it 127.0.0.1:8000

How can I solve this issue?
 
Some months ago the problem of communication in Client/Server solved using the IP address of my PC and the IP address of the other PC in the local network.

Now I want to commucinte between two computers but not in the local network, but between remote network.

I used the following IP Tracer, IP Tracker, IP Locator and other DNS tools
to locate the IP address for each remote computer. Giving those IP address in each client/server application in remote computers, they can't communicate between them.

Where I mistake? Any suggestion?
 
Actually my DSL modem follows a router that interconnect two pcs.

(I check in both pc's using the IP adress locator but both of them have the same IP address is that normal?)
 
Its kinda normal ...

{Internet} ---- {Modem} --- {Router} --< {Both PCs}

if it looks like that ... you need to use the internal address

{PC1} --- {Router} ---{Modem} --- {Internet} --- {Modem} --- {Router} --- {pc2}

if it looks like this ... you need to setup the routers
 
Yes, two pcs must communicate like this.

{PC1} --- {Router} ---{Modem} --- {Internet} --- {Modem} --- {Router} --- {PC2}

But what do I have to configure in router?

I guess both PC1 and PC2 to communicate between them, must be known them IP address, that is different from the address that the IP locator gives to me. Is my thinking is right?

So, how can find PC1 and PC2 IP address to make them communicate?
 
You must connect using the public ip. In router you need to set up port-forwarding so that the incoming connection that arrives the router is forwarded to the correct computer in your local network. You can find many resources on the web about port-forwarding, just about any kid that does P2P knows how to do this ;) Also, any firewall must allow the traffic through that port.
 
Back
Top