开发者

What could be preventing a client from connecting to the server?

开发者 https://www.devze.com 2023-01-31 04:51 出处:网络
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 cou

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).

0

精彩评论

暂无评论...
验证码 换一张
取 消