Getting VM a valid IP address
Hi Folks,
I recently came across a podcast with the author of pi-hole and immediately fell in love with the idea. I have been trying to get a VM setup to do this. However, I am having troubles setting the VM up so that it is accessible from my home network.
I initially had the network config as default so the VM got an IP (something like 10.0.0.x~). I then changed the adapater to "bridge" which gave it a more sensible looking IP (192.168.0.xx). I was successfully able to ping this IP from my host machine (and other machines on the network). However, the VM itself doesn't have internet now.
Is there a guide to setting up a VM so that it is ssh'able from the host machine while still having internet from the VM?
(Apologies if this is orthogonal to the sub's interests; Mods please feel free to delete if so)
EDIT: More details on the virtualization
- Host is Windows 10
- VM is running Ubuntu 18.04 LTS (guest addons installed)
- VirtualBox 6.1.0
- Network1: Connected to "Bridged Adapter"; ifconfig -a returns a valid IP (192.168.0.xx); IP is pingable from host; nothing is pingable (google.com) from VM
- Network2: Connected to "NAT Network (VirtualBox Host-Only Ethernet)"; ifconfig -a returns same IP; IP is *not* pingable from host; everything is pingable (google.com) from VM
Posted Jan 7, 2020, 3:05 PM UTC · edited
Mind sharing what virtualization software you're using? I should be able to help you out here.
Hi streets, thanks for the reply. I am running an Ubuntu 18.04 on VirtualBox. Host is windows 10.
Edit: 18.04, not 19.04