Answer the question
In order to leave comments, you need to log in
How to proxy all traffic between two VDS?
Hello.
#1 VDS ip conditionally 7.7.7.7 costs ancient LAMP
#2 VDS ip conditionally 8.8.8.8 costs more modern than LNMP
Task: Proxy all incoming traffic from #1 to #2 and all outgoing traffic from #2 to #1.
There are some services on the site that are bound to ip #1, both incoming and outgoing data. But the stack is obsolete.
If it was poorly stated:
The license is tied to ip 7.7.7.7 and the request to check the license is allowed only from this ip, you cannot change the ip of the license and buying a new one is also not an option, since it is cheaper to maintain a VDS zoo.
The script is transferred to the modern stack and all requests from the script must be executed from ip 7.7.7.7 and to the script through 7.7.7.7
But this applies not only to port 80, but to absolutely all traffic from all ports.
How to do this as simply as possible so that you can disable proxying with one command as well as enable it with one command after configuration.
But at the same time, so that you can send domains, etc. to ip 8.8.8.8, and everything old will remain on the old ip.
Add. #1
If traffic arrived immediately at 8.8.8.8 bypassing 7.7.7.7, then the response should come from 8.8.8.8
Answer the question
In order to leave comments, you need to log in
If I correctly understood your confusing task, then you need to configure DNAT on server 8.8.8.8 on 7.7.7.7. On 8.8.8.8, leave everything unchanged.
Then requests coming to 7.7.7.7 will come to 8.8.8.8 and return by the same route. Requests coming to 8.8.8.8 will be returned directly to the requester.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question