I'm trying to use an OVH node as a reverse proxy for several minecraft servers(mostly for DDoS protection and firewall customisation). The minecraft hosts are also running ubuntu, either 12.04 or 14.04, and the OVH has ubuntu on it. Currently I've tried doing this:
sysctl net.ipv4.ip_forward=1
iptables -t nat -A PREROUTING -p tcp --dport port -j DNAT --to-destination ip:port
iptables -t nat -A POSTROUTING -j MASQUERADE
This mostly works fine, with the exception of the obvious, that all the clients have the same IP as the server i've done this on. Is there any way i can set any of these devices up so that it preserves the original source IP? I've read that tcpproxy (http://www.quietsche-entchen.de/cgi-bin/wiki.cgi/proxies/TcpProxy) is a good solution to this, but i see no reason this problem would not continue.
I also wonder if using this would cause replies from the minecraft server to bypass the proxy, leaking the real IP's, which i would like to avoid.