[英]What could be preventing a client from connecting to the server?
My client connects to my Server very well locally (in a 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. 我的客户端很好地在本地连接到我的服务器(通过路由器在LAN中),但是当我尝试将客户端连接到不在LAN中的IP上的服务器时,它不起作用。 What could be the problem? 可能是什么问题呢?
The server is behind a NAT or a firewall or both. 服务器位于NAT或防火墙或两者之后。 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. 您需要在服务器网络上任何防火墙(包括可能在服务器上运行的软件防火墙)的端口上允许入站连接,并且,如果该防火墙位于路由器/ NAT之后,则需要设置该路由器以转发该路由器。服务器内部IP地址的所需端口。 Also remember that your server's local IP 192.168.xx is probably different than the IP you'll need to connect to (the IP that your router gets from the ISP). 还要记住,服务器的本地IP 192.168.xx可能与您需要连接的IP(路由器从ISP获取的IP)不同。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.