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