Connect one VM to Internet through other VM

I am trying to learn iptables and stuck with the following task:
VM2 has one interface (internal), VM1 has 2 interfaces (NAT and internal). How to make VM2 to have an access to the Internet using iptables?