Feb 17, 2016

0 Set static IP for Linux VM on VirtualBox













Configure Static IPs for VM's





Edit.





















Set Network.






























Enable DHCP server.































Add one network adapter, because you will need two network adapters.
NAT for Internet and a Host-Only for LAN.





Now boot up your VM and edit network.

sudo nano /etc/network/interfaces

# The primary network interface
# LAN 1
auto enp0s3
iface enp0s3 inet dhcp
## static IP
# LAN 2
auto enp0s8
iface enp0s8 inet static
  address 10.0.2.5
  gateway 10.0.2.2
  netmask 255.255.255.0

Restart networking service
sudo /etc/init.d/networking restart
or
sudo service networking restart

View assigned IP's [DHCP and STATIC]
sudo ip a | grep inet





0 comments :

Post a Comment

Comment: