Machine A: 192.168.200.10
Machine B: 192.168.198.50
Iptables Machine: eth0 192.168.200.11
eth1 192.168.198.11
1. Machine A(windows):
route -p add 192.168.198.0 mask 255.255.255.0 192.168.200.10
#tips: -p means permanently
route [-p] add [target networl] mask [netmask] [default gw]
2. Iptables Machine:
- echo 1 > /proc/sys/net/ipv4/ip_forward
- iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o eth0 -j MASQUERADE
- add the IPv4_FORWARD into /etc/sysconfig/network