I have a situation that can be described as bellow:
CentOS A: 188.8.131.52(eth0 - WAN network) --- 184.108.40.206 (ham0 - Hamachi)
Win32 B: 220.127.116.11 (WAN network) ---- 18.104.22.168 (hamachi)
I use iptables to forward port 80 from A to B, so that people can access web server of 22.214.171.124 from 126.96.36.199
iptables -t nat -A PREROUTING --dst 188.8.131.52 -i eth0 -p tcp --dport 80 -j DNAT --to-destination 184.108.40.206:80 iptables -t nat -A POSTROUTING -p tcp --dst 220.127.116.11 --dport 80 -j SNAT --to-source 18.104.22.168
But it did not.
If I change the forward target to an ip that not in hamachi network, but in the WAN network, in this example: 22.214.171.124. It works perfectly.
Please tell me which part that I'm wrong?