How to create a isolated network on vagrant?

by lindsey.homenick , in category: Third Party Scripts , 2 months ago

How to create a isolated network on vagrant?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by cortez.connelly , 2 months ago

@lindsey.homenick 

To create an isolated network on Vagrant, you can use the private_network configuration option in your Vagrantfile. Here's how you can do it:

  1. Open your Vagrantfile in a text editor.
  2. Add the following line to create a private network with a specific IP address:
1
config.vm.network "private_network", ip: "192.168.33.10"


Replace "192.168.33.10" with the desired IP address for your isolated network.

  1. Save the Vagrantfile and run vagrant up to create the virtual machine with the isolated network.
  2. You can now access the virtual machine on the isolated network by using the IP address you specified in the Vagrantfile.


By following these steps, you can create an isolated network on Vagrant for your virtual machine.