What could be preventing a client from connecting to the server?
My client connects to my Server very well locally (in a 开发者_Python百科LAN through a router) but when I try to connect my client to a server on a IP that is not in my LAN, it doesn't work. What could be the problem?
The server is behind a NAT or a firewall or both. You need to allow inbound connections on the port in any firewalls on the server's network (including a software firewall that might be running on the server), and if it is behind a router/NAT you will need to set up that router to forward the desired port to the servers internal IP address. Also remember that your server's local IP 192.168.x.x is probably different than the IP you'll need to connect to (the IP that your router gets from the ISP).
精彩评论