Setup NAT with iptables

TheĀ  Setup Having this setup where Machine A like to connect the Internet via Machine B.

Add the following lines to the iptables

and make sure to enable forwarding on Machine B