I have a test setup:
- client: 188.8.131.52
I'm trying to have client IP 184.108.40.206 do a HTTP request from the 220.127.116.11 server. However I want the 18.104.22.168 server to pass this request onto the real HTTPD server 22.214.171.124.
I would like 126.96.36.199 to directly talk to client 188.8.131.52 with the HTTP response.
I think however I require 184.108.40.206 to accept the HTTP request and then have it forward the request to 220.127.116.11 and have 18.104.22.168 respond then forward back to 22.214.171.124 with the resolution for this to work? Otherwise the client 126.96.36.199 will be getting a response back from 188.8.131.52 and not know why 184.108.40.206 is responding instead of 220.127.116.11 and ignore it?
Either way, this is what I tried via
iptables on 18.104.22.168:
iptables -t nat -A POSTROUTING -o venet0:0 -j SNAT --to-source 22.214.171.124 iptables -t nat -A PREROUTING -i venet0:0 -j DNAT --to-destination 126.96.36.199 iptables -t nat -A PREROUTING -d 188.8.131.52 -j DNAT --to-destination 184.108.40.206 iptables -t nat -A POSTROUTING -s 220.127.116.11 -j SNAT --to-source 18.104.22.168
This appeared to do no change.