简体   繁体   English

是什么导致客户端无法连接到服务器?

[英]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.

相关问题 是什么导致NodeMouseClick事件无法触发? - What could be preventing the NodeMouseClick event from firing? 从客户端连接到 SignalR 服务器 - Connecting to SignalR Server from Client 什么可能阻止样式在运行时应用于Silverlight控件? - What could be preventing styles from applying to a Silverlight control at runtime? 从 wopi 主机客户端连接到办公室在线服务器 - Connecting to office online server from a wopi host client 是什么导致应用程序焦点丢失后阻止我的组合框下拉列表显示? - What could be preventing my combobox dropdown from showing after app focus is lost? 将Silverlight客户端连接到SignalR服务器 - Connecting Silverlight client to SignalR server 从C#连接到SQL Server时可能出现的错误是什么? - What are possible mistakes when connecting to SQL Server from C#? 什么是'---从客户端到服务器的转换---'? - What is '---Transition from client to server---'? 什么会阻止我的 forms 应用程序在客户端上运行? - What could prevent my forms app from running on a client? 从WCF客户端连接到服务器的问题 - HTTPS端点 - 适用于本地开发但不适用于服务器 - Issue connecting to Server from WCF Client - HTTPS endpoint - Works on Local Dev but not Server
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM