On Host Machine — type these commands in Terminal.
thura @ ~ $ sudo iptables -A FORWARD -i vboxnet0 -j ACCEPT thura @ ~ $ sudo iptables -A FORWARD -o eth1 -j ACCEPT thura @ ~ $ sudo iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
That's it. Now you can access the external network of host machine from guest machines. To access Internet, you may need to edit /etc/resolve.conf in your guest machine.
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 8.8.8.8
No comments:
Post a Comment