I have two virtual machines running on virtual box. The master has one interface(eth0) bridged to the host nic(eth0) and another one connected to the internal network(eth1). This acts as a gateway to the internal network. The second virtual machine is connected to the internal network only (using eth0).
I cant seem to access the internet from the second virtual machine nor can i do ping -I eth1 22.214.171.124 for example.
Here is the script i use to setup nat
iptables -A FORWARD -i eth1 -j ACCEPT iptables -A FORWARD -o eth1 -j ACCEPT iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE iptables -A FORWARD -i eth1 -j ACCEPT
I dont know what i am doing wrong please help.