-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
105 lines (89 loc) · 3.59 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
Vagrant.configure("2") do |config|
def hardenVBox(vm)
vm.customize ["modifyvm", :id, "--boot1", "disk"]
vm.customize ["modifyvm", :id, "--boot2", "none"]
vm.customize ["modifyvm", :id, "--boot3", "none"]
vm.customize ["modifyvm", :id, "--boot4", "none"]
vm.customize ["modifyvm", :id, "--mouse", "ps2"]
vm.customize ["modifyvm", :id, "--audio", "none"]
vm.customize ["modifyvm", :id, "--usb", "off"]
end
config.vm.define "metasploitable" do |meta|
meta.vm.box = "e314c/Metasploitable2"
meta.vm.box_version = "0.0.1"
meta.vm.synced_folder '.', '/vagrant', disabled: true
meta.vm.provider "virtualbox" do |v|
v.memory = 1024
v.cpus = 2
hardenVBox(v)
end
end
config.vm.define "pfsense" do |pfsense|
pfsense.vm.box = "kennyl/pfsense"
pfsense.vm.box_version = "2.4.0"
pfsense.vm.synced_folder '.', '/vagrant', disabled: true
#NAT, adapter 1: built-in, used by Vagrant to provision
#bridged, adapter 2
pfsense.vm.network "public_network", type: "dhcp"
#LAN/host-only, adapter 3
pfsense.vm.network "private_network", type: "dhcp", ip: "172.16.1.1"
#OTP1/internal network, adapter 4
pfsense.vm.network "private_network", type: "dhcp", virtualbox__intnet: true, ip: "172.16.2.1"
pfsense.vm.provider "virtualbox" do |v|
v.memory = 512
v.cpus = 1
v.gui = true
hardenVBox(v)
v.customize ["modifyvm", :id, "--macaddress2", "080027DD12F8"]
v.customize ["modifyvm", :id, "--macaddress3", "080027B736E4"]
v.customize ["modifyvm", :id, "--macaddress4", "0800275A6EC4"]
end
pfsense.trigger.after :halt do |t|
t.info = "Kali: Killing Vagrant's NAT adapter!"
pfsense.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--nic1", "none"]
end
end
end
config.vm.define "kali" do |kali|
kali.vm.box = "kalilinux/rolling"
kali.vm.synced_folder '.', '/vagrant', disabled: true
#internal network, adapter 2
kali.vm.network "private_network", type: "dhcp", virtualbox__intnet: true
kali.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--macaddress2", "080027FF3D11"]
v.memory = 4096
v.cpus = 2
v.gui = true
hardenVBox(v)
end
kali.trigger.after :halt do |t|
t.info = "Kali: Killing Vagrant's NAT adapter!"
kali.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--nic1", "none"]
end
end
end
config.vm.define "splunk" do |splunk|
splunk.vm.box = "badarsebard/centos-7.5-splunk"
splunk.vm.box_version = "7.2.3.0"
splunk.vm.synced_folder '.', '/vagrant', disabled: true
splunk.vm.provider "virtualbox" do |v|
v.memory = 4096
v.cpus = 2
hardenVBox(v)
end
end
config.vm.define "snort" do |snort|
snort.vm.box = "ubuntu/xenial64"
snort.vm.synced_folder '.', '/vagrant', disabled: true
snort.vm.provider "virtualbox" do |v|
v.memory = 4096
v.cpus = 2
hardenVBox(v)
end
#todo: provide a variable to pass in the Oinkcode
#todo: include the relevant autosnort files in this directory, patched for Vagrant config
#(need to patch in the o_code into full_autosnort.conf)
end
end