Ask a single IP address to access multiple servers. server 1 is equipped with two Nics. Nic 1 is configured with a public IP address. Internet access is allowed. server NIC 2 is configured with a private IP address, how can I access server 2 through the Internet while ensuring security? I once naively thought that as long as the URL of the program on server 1 is written as the IP address of the website on server 2, I found the problem of asking a single IP address to access multiple servers.
Server 1 is equipped with two NICs, and Nic 1 is configured with a public IP to access this server.
Nic 2 configure private IP address and connect to server 2
How can I access server 2 through the Internet while ensuring security?
I once naively thought that as long as the URL of the program on server 1 is written as the IP address of the website on server 2, I found that the access failed, the original program will think that the customer needs to directly access server 2, because the IP address of server 2 is a private IP address, so it cannot be accessed.
Ask how to "delegate" server 1 to access the program on server 2 and then return the processing result to server 1.
Please advise me.
------ Solution --------------------
You can also do this (in fact, using a php program as a router)
No
A page on server 1 iframe src = a page on server 2
Instead
On a page on server 1, iframe src = vro program of server 1
The router program completes data retrieval from a page of server 2
Just like capturing data from other websites to your own website.
------ Solution --------------------
This can be achieved through apache forwarding. I haven't tried it, but the company doesn't want to give me dual NICs. I can't afford to find the configuration online. you can see it.
Create your website directly on server a of the network adapter. directly forward the accessed content to your content. apache acts as a proxy.
ServerAdmin abc@123.com
ServerName 10.88.3.7
ErrorLog logs/rsa-error.log
CustomLog logs/rsa-access.log common
ProxyPass / http://10.88.3.5:7001
ProxyPassReverse / http://10.88.3.5:7001