I'm hoping someone can help me with this configuration. I already have a working setup where a Linux box is acting as a router just doing port forwarding for public IP's. These are all public IP's btw.
HOST_x - Can be any host with public IP. (ex: x.x.x.x)
MY_LINUX - Using IPtables just doing port forwarding for public IP's. (Fixed IP, ex: 22.214.171.124)
SERVER - Web server having public IP address. (Fixed IP, ex. 126.96.36.199)
PORT - (TCP PORT = 80)
Here's the config on MY_LINUX:
iptables -t nat -A PREROUTING -p tcp -d 188.8.131.52 --dport 80 -j DNAT --to-destination 184.108.40.206:80 iptables -t nat -A POSTROUTING -p tcp -d 220.127.116.11 --dport 80 -j MASQUERADE
The configuration above works. When HOST_x types in 18.104.22.168 on the browser it gets the webpage from 22.214.171.124.
The only issue I have here is that the destination SERVER (126.96.36.199) sees the request coming from MY_LINUX (188.8.131.52), what I want to see is the original IP of the requesting HOST_x (x.x.x.x).
I would appreciate any suggestions, thank you.