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