HowTo: Enable all IP ranges for VirtualBox host-only adapters

Let’s say you need to spin up a VirtualBox machine that requires a Class A IP for its host-only network. All the sudden, it halts the provisioning process and prints out the following message:

The IP address configured for the host-only network is not within the
allowed ranges. Please update the address used to be within the allowed
ranges and run the command again.


Valid ranges can be modified in the /etc/vbox/networks.conf file. For
more information including valid format see:

You glanced at the suggested documentation, but since you are in a hurry missed the part where it clearly says how to enable all IP ranges for the host-only adapters. So, you just google it, and here we are :)

Step-by-Step solution

  1. As super user (root or sudoer), ensure the /etc/vbox directory exists
  2. As super user (root or sudoer), write * ::/0 into the /etc/vbox/networks.conf file
  3. Done. No restart is required
# tl;dr give me the code!
$ sudo mkdir /etc/vbox
$ echo '* ::/0' | sudo tee /etc/vbox/networks.conf

Side note

It might look dumb that I wrote a post about something that is already documented. But I was that hasty person googling this issue hoping to get lucky back then, so I felt the need to spell it out to anyone else in the same situation. “Homies help homies, always.”

PS: The * at the beginning of every entry in the networks.conf file is mandatory. In my rush, I overlooked it and it gave me a mild headache for free.

Last modified on 2022-01-09