I wanted to host few gameservers on my home network to play with my buddies, the thing is having a public ip is like begging to get DDoS'ed, so what ive done is i have set up a OpenVPN server on a DDoS protected vps with ip 78.128.113.x. My home server public ip is 212.5.59.x.
I have used these iptables rules to forward traffic from the vps to my home server via OpenVPN:
iptables -t nat -A PREROUTING -d 78.128.113.x -p udp --dport 7730 -j DNAT --to-dest 10.8.0.2:7730 iptables -t nat -A POSTROUTING -d 10.8.0.2 -p udp --dport 7730 -j SNAT --to-source 10.8.0.1
10.8.0.1 is the OpenVPN gateway i think and 10.8.0.2 is the ip my home server has got from the OpenVPN server.
The problem here is that when someone connects to the server his ip is listed as 10.8.0.1 instead of his real ip.
Is there any way i can fix that?