sudo iptables -t nat -A PREROUTING -d 202.96.128.81 -p tcp --dport 8888 -j DNAT --to-destination 192.168.0.100:3389
sudo iptables -t nat -A POSTROUTING -d 192.168.0.100 -p tcp --dport 3389 -j SNAT --to 192.168.0.99
sudo iptables -A FORWARD -d 192.168.0.100 -p tcp --dport 3389 -j ACCEPT
sudo iptables -A FORWARD -s 192.168.0.100 -p tcp --sport 3389 -j ACCEPT
sudo sh -c "iptables-save > /etc/iptables.rules" #保存
sudo vim /etc/network/interfaces #网卡配置文件,添加下面这行
pre-up iptables-restore < /etc/iptables.rules #启用网卡时加载