mirror of
https://github.com/rapid7/metasploitable3.git
synced 2024-06-30 16:55:50 +02:00
All of the software installation and configuration is occurring on packer now. Vagrant just brings the box up and adjusts the firewall. We probably want to do more configuration on the vagrant side to make it more flexible, but this code is working so I wanted to commit it.
21 lines
639 B
Ruby
21 lines
639 B
Ruby
# -*- mode: ruby -*-
|
|
# vi: set ft=ruby :
|
|
|
|
Vagrant.configure("2") do |config|
|
|
# Base configuration for the VM and provisioner
|
|
config.vm.box = "metasploitable3"
|
|
config.vm.hostname = "metasploitable3"
|
|
config.vm.communicator = "winrm"
|
|
|
|
config.vm.network "private_network", type: "dhcp"
|
|
|
|
# Configure Firewall to open up vulnerable services
|
|
case ENV['MS3_DIFFICULTY']
|
|
when 'easy'
|
|
config.vm.provision :shell, path: "scripts/configs/disable_firewall.bat"
|
|
else
|
|
config.vm.provision :shell, path: "scripts/configs/enable_firewall.bat"
|
|
config.vm.provision :shell, path: "scripts/configs/configure_firewall.bat"
|
|
end
|
|
end
|