coffeeMiner/virtualbox_scenario_instructions.md
virtualbox_scenario_instructions.mdRaw
1### Instructions to setup VirtualBox scenario
2
3
4In each machine, remember to setup the dns server, for example, in /etc/resolv.conf:
5
6```
7nameserver 8.8.8.8
8```
9
10### Victim
11- network adapter:
12 - Host-only Adapter
13- /etc/network/interfaces:
14
15```
16auto lo
17iface lo inet loopback
18
19auto eth0
20iface eth0 inet static
21 address 10.0.2.20
22 netmask 255.255.255.0
23 gateway 10.0.2.15
24```
25
26### Attacker
27- network adapter:
28 - Host-only Adapter
29- /etc/network/interfaces:
30
31```
32auto lo
33iface lo inet loopback
34
35auto eth0
36iface eth0 inet static
37 address 10.0.2.10
38 netmask 255.255.255.0
39 gateway 10.0.2.15
40```
41
42
43### Gateway
44- network adapter:
45 - Bridged Adapter
46 - Host-only Adapter
47- /etc/network/interfaces:
48
49```
50auto lo
51iface lo inet loopback
52
53auto eth0
54iface eth0 inet dhcp
55
56auto eth1
57iface eth1 inet static
58 address 10.0.2.15
59 netmask 255.255.255.0
60```
61
62Clean IPTABLES:
63
64```
65iptables --flush
66iptables --table nat --flush
67```
68
69Configure the Gateway machine as a router:
70
71```
72echo 1 > /proc/sys/net/ipv4/ip_forward
73
74iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
75
76iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT
77iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
78```