R3dy / capsulecorp-pentest

Vagrant VirtualBox environment for conducting an internal network penetration test
https://www.manning.com/books/the-art-of-network-penetration-testing?a_aid=royce
815 stars 156 forks source link

The network addresses are not in the allowed ranges. #89

Closed PaulRein closed 1 year ago

PaulRein commented 2 years ago

Hi!

I'm trying to set up the training environment on OS X (Catalina) following the MacOS Setup Guide. (using Vagrant 2.3.1, ansible [core 2.13.4], virtualbox: 6.1.38,153438)

When bringing up goku (i.e. step 4.1 in the installation instructions), the following error appears:

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.

Address: 172.28.128.100 Ranges: 192.168.56.0/21

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

https://www.virtualbox.org/manual/ch06.html#network_hostonly

According to that link:

On Linux, Mac OS X and Solaris Oracle VM VirtualBox will only allow IP addresses in 192.168.56.0/21 range to be assigned to host-only adapters.

I don't know if this is a recently introduced restriction.

The solution is to create a file /etc/vbox/networks.conf and add a line like:

* 172.28.128.100/16 192.168.56.0/21

to it. (Best to include the default range as well.) (Probably the range for the extra net does not need to be a full /16 net but I'll let those who know the environment better decide on that.)

I think the installation instructions (for OS X) should be amended to add this step before starting to bring up machines.

R3dy commented 1 year ago

Sorry I haven't been responsive on Github issue tracker. It's easier to reach me on Discord!