Skip to content

Instantly share code, notes, and snippets.

@cblpok
Created November 8, 2022 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cblpok/ce3e62103b597bbd03f4a04faeda6e32 to your computer and use it in GitHub Desktop.
Save cblpok/ce3e62103b597bbd03f4a04faeda6e32 to your computer and use it in GitHub Desktop.
diff --git a/scripts/homestead.rb b/scripts/homestead.rb
index 3602db8..10dfcf3 100644
--- a/scripts/homestead.rb
+++ b/scripts/homestead.rb
@@ -25,7 +25,7 @@ class Homestead
# Configure A Private Network IP
if settings['ip'] != 'autonetwork'
- config.vm.network :private_network, ip: settings['ip'] ||= '192.168.56.56'
+ config.vm.network :private_network, ip: settings['ip'] ||= '192.168.56.56', name: "HostOnly", virtualbox__intnet: true
else
config.vm.network :private_network, ip: '0.0.0.0', auto_network: true
end
@@ -45,6 +45,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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment