Helloo

iam building vb chat application using winsock, work on LAN but problem that face me that iam tring to connect to a computer in a network
this computer in a network of three computers "192.168.2.1" and "192.168.2.2" and "192.168.2.3" local Ip's and with only one internet IP, so the three are connected to the same internet ip "72.140.1.16" and i want to talk with the third one?iam outside this network. How...

in my Computer app i have that outside LAN & connect to internet:

Winsock.Close
Winsock.RemotePort = 3917
Winsock.RemoteHost = "72.140.1.16" 'remote ip of the lan, that has the client computer
Winsock.Connect

& in Client that on the LAN & connect to internet:
Winsock.LocalPort = 3917
Winsock.Listen

so i having this values for ex: client local ip "192.168.1.3" and client remote ip "72.140.1.16" i know how to get this values but i want to know how to connect from server to client using this values.

as i read some ask me to configure the modem or "router" to forward this port to my local ip but i don't want to configure , absolutely there is a way without configure the modem how all chat works like msn,..

so i want without any hardware configuration, i want it like using Gateway or anything i don't know what? so it will be chatting over internet not over LAN.

Thanksssssss

Don't confuse the difference between a machine initiating a connection, and having one initiated with it. If 192.168.1.3 tries to make a connection to a server on the internet, it will do so no problem, because the router remembers who start the conversation. You are trying to make a client outside of the network connect to a server inside the network (backwards of what MSN does), and that requires you to forward a port in the router to the client... period. No exceptions. The only way to do what you want is to MAYBE make the chat happen by sending a broadcast packet, so that 192.168.1.1, 192.168.1.2, AND 192.168.1.3 all receive the message, but 192.168.1.1 and 192.168.1.2 will simply discard it (since it isn't meant for them). You also need to pray that the router isn't advanced enough to know to block what is essentially a smurf attack, used to try to be legitimate traffic.... this would also devour network resources on the internal LAN..... but that's about the only options you have....

1) Let 192.168.1.3 initiate the conversation, and have the server be outside
2) Pray you can send broadcast packets from outside the network
--This will require packet spoofing, so forget about winsock
3) Forward The Port to 192.168.1.3... The proper way to do things.

regard the option 1) thats what i want if the 192.168.1.3 initiate the conversation, how can i replay to it by setting what ip or what configurations

iam sorry for the previous comment.

ok i understanf what you write.

is there a way to allow the vb listen to a website 'php script or ...' and communicate with the other pc through this web...

thx

This article has been dead for over six months. Start a new discussion instead.