Why can't i connect to a remote computer?

gididaf

Member
Joined
Dec 30, 2010
Messages
8
Programming Experience
5-10
Hello everyone!
i tried this chat:
VB.NET Chat Server Program

when i use some computer in my home that connect to the same Reuther, it's work fine
i can chat and it's all great

but when i open the Server.exe in my home and tell my friend in another house with another Reuther to connect the server, he can't

he show the message:
No connection could be made because the target machine actively refused it

why? why i can't make a connection in VB.NET with every computer that i want?
why every computer need to be connected to the same Reuther?

any solution?
 
This question gets asked over and over and it's really nothing to do with VB.NET. When you run your client and server at home, you are using IP addresses that exist only inside your local network. Noone outside your local network can see those IP addresses. Out on the internet, your whole network only has one IP address, i.e. the one that your ISP assigns to you. That is the only IP address that anyone outside your local network can use to contact any of the machines on your local network.

As s1ck0h suggests, you need to set up port forwarding on your router such that your friend can use your public IP address and a specific port number to contact your network and the router will then forward that traffic to a specific machine. Port forwarding is configured differently on different routers and may go by different names too. If you're not sure, consult your router documentation.
 
This question gets asked over and over and it's really nothing to do with VB.NET. When you run your client and server at home, you are using IP addresses that exist only inside your local network. Noone outside your local network can see those IP addresses. Out on the internet, your whole network only has one IP address, i.e. the one that your ISP assigns to you. That is the only IP address that anyone outside your local network can use to contact any of the machines on your local network.

As s1ck0h suggests, you need to set up port forwarding on your router such that your friend can use your public IP address and a specific port number to contact your network and the router will then forward that traffic to a specific machine. Port forwarding is configured differently on different routers and may go by different names too. If you're not sure, consult your router documentation.

Well thank you very much for this post!
i will check it out and see what happened :love_heart:
 
This question gets asked over and over and it's really nothing to do with VB.NET. When you run your client and server at home, you are using IP addresses that exist only inside your local network. Noone outside your local network can see those IP addresses. Out on the internet, your whole network only has one IP address, i.e. the one that your ISP assigns to you. That is the only IP address that anyone outside your local network can use to contact any of the machines on your local network.

As s1ck0h suggests, you need to set up port forwarding on your router such that your friend can use your public IP address and a specific port number to contact your network and the router will then forward that traffic to a specific machine. Port forwarding is configured differently on different routers and may go by different names too. If you're not sure, consult your router documentation.

BTW-
i need to use Port Forwarding on the Server pc and than all the other cliends will be able to connect the server?
or i need to use it on each Client pc?
or BOTH? (Port Forwarding on the Server pc and then EVERY client pc)

thanks!
 
Back
Top