奇怪的远程连接问题

发布于 2024-07-16 10:29:43 字数 576 浏览 2 评论 0原文

在尝试通过 TCP 配置 .NET 远程处理设置时,我在接受外部连接(来自 LAN 以外的任何计算机的连接)时遇到了问题。 我做了一些调查,并在我的朋友开始连接后立即点击了 netstat -a。 这是我所看到的:

TCP 0.0.0.0:2594 Taylor-PC:0 监听
...
TCP 192.168.1.102:2594 24-155-7-16:63588 已建立
TCP 192.168.1.102:62488 192.168.0.100:1554 SYN_SENT

现在这是奇怪的部分:24.155.7.16 是我朋友的 IP(已修改),它表示连接已建立。 但连接会挂起,直到超时。 然后我发现 192.168.0.100 是他网络上的本地地址。 某处发生了一些奇怪的事情。 我的服务器和客户端都是 TCPChannel,后者初始化为“new TCPChannel( 0 )”。 当我在与服务器相同的计算机上运行客户端时,本地主机连接可以工作,但无法接受远程连接。 不存在端口转发或防火墙问题。

谢谢您的帮助

In trying to configure a .NET remoting setup over TCP, I've been having problems accepting outside connections (connections from any computer not on my LAN). I did some investigation and hit netstat -a as soon as my friend started to connect. Here's what I saw:

TCP 0.0.0.0:2594 Taylor-PC:0 LISTENING
...
TCP 192.168.1.102:2594 24-155-7-16:63588 ESTABLISHED
TCP 192.168.1.102:62488 192.168.0.100:1554 SYN_SENT

Now here's the weird part: 24.155.7.16 is my friend's IP (modified) and it says the connection is established. But the connection hangs until it times out. I then found out that 192.168.0.100 is his local address on his network. Something screwy's going on somewhere. My server and client are both TCPChannels, the latter initialized 'new TCPChannel( 0 ).' Localhost connections work when I run a client on the same machine as the server, but I can't accept remote connections. There is no port forwarding or firewall issue.

Thanks for the help

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

笑着哭最痛 2024-07-23 10:29:43

您朋友的子网是否与您的子网具有相同的 IP 地址范围(例如 192.168.0.*)? 我以前也遇到过类似的问题...更多是由于路由器配置而不是其他原因,因为子网具有相同的 IP 地址范围。 他是否尝试过直接连接互联网? 或者他或您可以更改您的子网吗?

Does your friend's subnet have the same IP address range as your subnet (e.g. 192.168.0.*)? I've had similar problems before... more due to router configuration than anything else because of subnets with identical IP address ranges. Has he tried directly connected to the internet? Or is he or you able to change your subnet?

一笑百媚生 2024-07-23 10:29:43

再次检查服务器端的防火墙,例如服务中的 Windows 防火墙/Internet 连接共享 (ICS)

Check again the firewalls in the server side, like Windows Firewall/Internet Connection Sharing (ICS) in Services

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文