Before discussing multi-layer development, let's talk about the old c/s program.
A friend of mine asked me a few months ago to say that it was a system I used to run on a LAN. Now there are two campuses, another campus also wants to use,
The Internet is available for both campuses. I took a look at the C/S system that I developed 10 years ago. The source code has disappeared. I said we can use the current mode.
Re-develop a set, but it takes time and money. A friend asks to solve the problem within one week. At the same time, he thinks that the existing functions of the system are sufficient and the system is very stable, and they are used to the operation,
There is no need for further development. See how to quickly and securely implement the Internet operation of the two campuses under the existing conditions. Without source code, you can only solve this problem through the network.
The IP address is directly set to a public IP address and can be accessed remotely. However, this is a silly practice, because the database is directly exposed on the Internet, and it is estimated that the server will be finished in a day (at the same time, the data transmitted by the system can be sniffed by hackers or Trojans at any time ).
Therefore, you must use hardware VPN to solve this problem. Fortunately, there are very cheap VPN devices (about-yuan ). We achieved system expansion in one day.
The system network topology is as follows:
Of course, another solution is to use the Windows VPN function. The server needs a Windows VPN Server. When the client needs to run the program
VPN dialing, and then you can use it. Of course, to ensure the security of the Windows server, you must install or enable the firewall function.
The network topology of the system is as follows:
The above two methods are theoretically suitable for any C/S system program because they do not need to change the source code.
Of course, if the source code is available, we can implement the above functions more flexibly. Of course, the prerequisite is that the system functions will not be changed.
Here we need to use SSH to establish a secure connection. SSH is a reliable protocol designed for remote login sessions and other network services. The SSH protocol can effectively prevent information leakage during Remote Management.
After establishing a connection, you can use the port forwarding function to map the remote database listening port to a local server or local machine to securely access the database server.
In Delphi, you can use securebridge of devart to implement the above functions.
The working network topology is as follows: