How to forward all traffic and IP addresses

I want to build a system that allows me to have "floating IPs". To do this, I want to have a single server with 5 IP addresses. It then relays that traffic to another machine (or more) that contains 4 VPSes. This second machine only has one real IP address, but I want each VPS to have a dedicated IP. Server 1 will be in a datacenter, server 2 will be in another datacenter. But I can't get multiple IPs on server 2, so I have to simulate it. Also I'll be able to move server 2 to a different datacenter later and my IPs can be forwarded to the new IP of server 2 without issue.

The two computers are going to be in different locations, so I can't just combine them. I'll need to tunnel traffic across the internet from one to the other.

I don't know enough about networking to be able to seamlessly forward all traffic. Where do I start learning in order to figure out? Also if you have any ideas on what I need to do, I would really appreciate it. I have searched the internet and it is so overwhelming, I just figured asking here someone could point me in the right direction.

5IP ========> Server1 ====5IP===>Server 2

In the diagram, the ISP directs traffic from 5 ips to Server1. Server2 gets traffic from Server1, but it should think that it got traffic from the internet.

The big issue I'm thinking of is that I want it to forward all traffic, not just TCP. I just have no idea how to get started. Thank you.


Yes, it's possible to create a tunnel to forward traffic to your other data center. Server 1 will act as a router to forward traffic into a GRE tunnel between data center 1 and data center 2. The trick

Given your very generic scenario, that's as about as detailed an answer as I can give you. If you provide more information about your topology, we can suggest more specific things.