Skip to content

Instantly share code, notes, and snippets.

@trydofor
Last active February 20, 2018 09:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trydofor/72ea2cd0deb5621d92ea73f7b563f7a7 to your computer and use it in GitHub Desktop.
Save trydofor/72ea2cd0deb5621d92ea73f7b563f7a7 to your computer and use it in GitHub Desktop.
virtualbox ubuntu 16.04
# host
sudo iptables -t nat -A POSTROUTING -s 192.168.56.0/24 -j MASQUERADE
# guest
sudo vi /etc/network/interfaces
auto enp0s3
#iface enp0s3 inet dhcp
iface enp0s3 inet static
address 192.168.56.101
netmask 255.255.255.0
gateway 192.168.56.1
dns-nameservers 192.168.56.1 8.8.8.8
sudo service networking restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment