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