Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save swuecho/42426a4a5e4d25c4779af3375e98894a to your computer and use it in GitHub Desktop.

Select an option

Save swuecho/42426a4a5e4d25c4779af3375e98894a to your computer and use it in GitHub Desktop.
VirtualBox Host-Only Adapter with Static IP

Virtual Box Host-only Adapter

Add a host only adapter to the VM in VirtualBox On the client, setup eth1 to use a static IP address temporarily.

$ ifconfig eth1 192.168.56.101 netmask 255.255.255.0 up

To make this change permanent, add the following to /etc/network/interfaces*

$ sudo nano /etc/network/interfaces
# The host-only network interface
auto eth1
iface eth1 inet static
address 192.168.56.101
netmask 255.255.255.0
network 192.168.56.0
broadcast 192.168.56.255
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment