Answer the question
In order to leave comments, you need to log in
How to redirect https traffic while keeping client IP?
Greetings!
It is necessary to redirect https traffic, change the destination address, while maintaining the client's IP, to the VPS.
For example:
The client (IP: 1.1.1.2) pulls the url https://site.com/index.html, while site.com looks at our VPS (IP: 2.2.2.2), which accepts this request and directs it to https ://site-two.com/index.html (IP: 3.3.3.3), which sees that a client with IP = 1.1.1.2 came to him, and not the IP of the VPS.
When implementing, you can refuse to use domains and take specific IPs, this is not important, but domains are desirable. You can only do something on VPS. IP of all participants from different subnets.
If I understand correctly, then you need to write a number of rules in iptables, but which ones? Is iptables enough or do you need more/other tools?
Answer the question
In order to leave comments, you need to log in
Diving deeper into the TCP / IP protocol, it became clear that this is an extremely difficult task, and in general such an action is of a malicious nature and is called IP spoofing. Thanks to everyone who replied, thread closed.
it's enough just to set up nginx on site.com, which will do exactly what you need.
nginx in 60% is used not as a separate web server, but as a proxy for Apache, where you can change the headers and domains and urls and whatever you want.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question