Skip to content

Instantly share code, notes, and snippets.

@fapestniegd
Created January 26, 2010 18:33
Show Gist options
  • Save fapestniegd/287077 to your computer and use it in GitHub Desktop.
Save fapestniegd/287077 to your computer and use it in GitHub Desktop.
switch to vmware-hostonly-1
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -p tcp -d 192.168.7.70 --dport 3389 -j DNAT --to-destination 10.0.1.128:3389
iptables -t nat -A POSTROUTING -p tcp -d 10.0.1.128/32 --dport 3389 -j SNAT --to-source 10.0.1.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment