Created
November 15, 2022 22:43
-
-
Save igorsgm/0fadb09bb5d89166acc5cd22598ed32d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/homestead.rb b/homestead.rb | |
index 8d77a34..3fff00d 100644 | |
--- a/homestead.rb | |
+++ b/homestead.rb | |
@@ -19,7 +19,8 @@ class Homestead | |
config.vm.hostname = settings["hostname"] ||= "homestead" | |
# Configure A Private Network IP | |
- config.vm.network :private_network, ip: settings["ip"] ||= "192.168.10.10" | |
+ # config.vm.network :private_network, ip: settings["ip"] ||= "192.168.10.10" | |
+ config.vm.network :private_network, ip: settings['ip'] ||= '192.168.10.10', name: "HostOnly", virtualbox__intnet: true | |
# Configure Additional Networks | |
if settings.has_key?("networks") | |
@@ -36,6 +37,7 @@ class Homestead | |
vb.customize ["modifyvm", :id, "--natdnsproxy1", "on"] | |
vb.customize ["modifyvm", :id, "--natdnshostresolver1", settings["natdnshostresolver"] ||= "on"] | |
vb.customize ["modifyvm", :id, "--ostype", "Ubuntu_64"] | |
+ vb.customize ["modifyvm", :id, "--nic2", "hostonlynet", "--host-only-net2=HostOnly"] | |
if settings.has_key?("gui") && settings["gui"] | |
vb.gui = true | |
end |
After that, create the Host-only Network in our VirtualBox. So run this in our Terminal:
- If you are using the old IP
192.168.10.10
:
VBoxManage hostonlynet add --name=HostOnly --netmask=255.255.255.0 --lower-ip=192.168.10.1 --upper-ip=192.168.10.100 --enable
- If you are using the new IP
192.168.56.56
:
VBoxManage hostonlynet add --name=HostOnly --netmask=255.255.255.0 --lower-ip=192.168.56.1 --upper-ip=192.168.56.100 --enable
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you are already using the new Vagrant IP, replace
192.168.10.10
by192.168.56.56