I have a situation that can be described as bellow:
CentOS A: 18.104.22.168(eth0 - WAN network) --- 22.214.171.124 (ham0 - Hamachi)
Win32 B: 126.96.36.199 (WAN network) ---- 188.8.131.52 (hamachi)
I use iptables to forward port 80 from A to B, so that people can access web server of 184.108.40.206 from 220.127.116.11
iptables -t nat -A PREROUTING --dst 18.104.22.168 -i eth0 -p tcp --dport 80 -j DNAT --to-destination 22.214.171.124:80 iptables -t nat -A POSTROUTING -p tcp --dst 126.96.36.199 --dport 80 -j SNAT --to-source 188.8.131.52
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: 184.108.40.206. It works perfectly.
Please tell me which part that I'm wrong?