I'm not even sure if this is possible...
Also, please forgive my ignorance on the subject.
What I'm looking for is for "something" that would allow me to redirect all TCP traffic arriving to host A to host B, but based on some rules.
Say host A (the intermediary) receives a request (say a simple HTTP request) from a host with domain X.
In that case, it lets it pass through and it's handled by host A itself.
Now, let's suppose that host A receives another HTTP request from a host with domain Y, but this time, due to some customizable rules, host A redirects all the traffic to host B, and host B is able to handle it as if came directly from domain Y. And, at this point, both host B and the host with domain Y are able to freely communicate (of course, thought host A).
NOTE: All these hosts are on the Internet, not inside a LAN.
Please, let me know if the explanation is not clear enough.