简体   繁体   中英

connection between one web-server one private server

I have a web server and I want to make connection between a private server. The goal is to exchange data, while the two computer is keeping the connection.

I can't open port on the web server and I don't want to open one on the private server. So i can't use sockets. This is because I don't want the private server to be accessible to anyone on the internet. The best solution would look like the private server initiate the connection and then the web server accepts it and then the connection is established.(Because I can't open ports, I have to use port 80 on the web server side.) So now some data can flow to both sides.

The big question: How can I manage this without opening any port (manually?) I want to make this in PHP but if there something else that can solve this then that's okay too.

EDIT : I can't install any software (vpn, etc..) on the web server

You should add some information about what type of data you want to exchange between the two systems. And what you mean by "exchange" here.

In general it is very hard to initiate a connection between two systems when none of them is listening on some port. That does not have to be insecure, there are many ways to lock that down. Actually the system you call "web server" already has a port it is listening on, port 80. So indeed you can use that. However the http protocol typically spoken on that port is not first choice for many types if data exchange. That's why I asked for more details about that above.

I suspect you have some other means of access to both systems, since somehow you must be able to access them to install software and the like. Typically that is done by using ssh , the "secure shell". If you have such access (which actually also means one port is open and listened to, typically that is port 22), then you could use that for your exchange. If for example you want to synchronize data (file hierarchies), then the rsync protocol / utility is probably the best and easiest approach, since it can transfer data via a secure shell layer.

But as said above: to tell more you really need to add more details about what it is you want to do to your question.

EDIT : I can't install any software (vpn, etc..) on the web server

专用计算机可以通过Web服务器执行“ PUT / GET”来传输文件内容。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM