使用外部IP连接到系统 [英] Connect to a system using external ip

查看:78
本文介绍了使用外部IP连接到系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述







我有一台主服务器ipv4 180。***。***。***(外部ip)

和ive将许多客户端连接到这个服务器。

一个客户端192.168.1.1

如何连接到这个客户端使用外部IP。

Plz帮助。





谢谢

Andrew




I have a main server ipv4 180.***.***.***(external ip)
and ive connected many clients to this server.
an one of the client 192.168.1.1
how to connect to this client using the external ip.
Plz help.


Thanks
Andrew

推荐答案

连接到客户端既不可能也不可能。这只是 oxymoron 。客户端连接到服务器,服务器和客户端在两个方向上或在一个方向上发送/接收消息无关紧要。因此,服务器需要客户端知道IP,该客户端可以访问。客户端需要端口号。客户的IP地址完全不相关。



-SA
"Connect to client" is neither possible nor impossible. This is just the oxymoron. Client connects to server, and the server and client send/receive messages in both directions, or on one direction, does not matter. Hence, the server needs to have IP known to the client, accessible to this client. And client needs the port number. Client's IP address is totally irrelevant.

—SA


服务器不会询问客户端请来和我联系。它是连接到服务器的客户端。因此,客户端必须具有您已经拥有的服务器的IP。并且服务器必须具有客户端已知的IP,并且客户端必须具有端口号。



并且为了解决您的问题,如果您希望您的服务器可以连接到客户端,那么你的客户端应该有这样的机制(即代理),它可以像服务器一样运行,服务器的行为就像是客户端。



<客户端服务器的b>代理需要双方都在那里,以实现你想要说的任何东西。



-KR
Server doesn't ask client that "Please come and connect with me". It is the client that connects to the server. Therefore Client must have the IP of the server, which you have already. And the server must have IP known to the client and client must have the port number.

And to address your problem, if you want that your server can connect to the client, then your client should have such mechanism (i.e Proxy) that it can behave like server and the server behaves like it is a client.

The proxy of the client-server needs to be there on both the side in order to achieve something like whatever you're trying to say.

-KR


这篇关于使用外部IP连接到系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆