# Milestone 1

## Steps

### Setup server

* Added more ram

### ESXi Setup

1. Plugged into network (got ipmi network)
2. Went to web gui (192.168.3.164 {DHCP})
   1. Logged in
      * Username: ADMIN
      * Password: redacted
   2. Used iKVM/HTML5
      * Launched from usb (physically plugged into server)

Started ESXi install

1. Used the 500GB m.2 drive as main boot drive
2. Set root password
3. Installed OS to disk

#### Put Super in rack

1. Configured networking for eth0
2. IP: 192.168.7.32
3. Sub: 255.255.255.0
4. Gateway: 192.168.7.250

### Connect to ESXi in web GUI

#### Upload ISOS

* Upload isos
  1. Go to Storage
  2. Datstore browser
  3. make isos folder
  4. Upload

<figure><img src="https://3651363121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXRfFXlnajFLDrEaLTRkL%2Fuploads%2FWRf64EprswaXbFdWdLqX%2Fimage.png?alt=media&#x26;token=38e53858-2a20-49b3-8333-7e68eb4525e7" alt=""><figcaption></figcaption></figure>

#### Make Virtual Switch

* Go to the networking tab
  1. Virtual Switches
     1. Add standard virtual switch
     2. Name: 480-WAN
     3. And delete uplink1

<figure><img src="https://3651363121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXRfFXlnajFLDrEaLTRkL%2Fuploads%2Fow8MLNqhFE5kWu4vlqZB%2Fimage.png?alt=media&#x26;token=0a7df8c8-1f88-41b3-b80a-a7e0ebcf9a11" alt=""><figcaption><p>How config should look</p></figcaption></figure>

#### Port Groups

* Port Groups
  1. Add Port Group
  2. Name: 480-WAN
  3. Virtual Switch: 480-WAN

<figure><img src="https://3651363121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXRfFXlnajFLDrEaLTRkL%2Fuploads%2FkZMNZ94RJbjfF1Dyqced%2Fimage.png?alt=media&#x26;token=0668a75f-1656-443f-aa9c-f035b53da9b7" alt=""><figcaption><p>How Config should look</p></figcaption></figure>

#### Making a New VM

1. Virtual Machines
2. Create / Register VM
3. Name
4. Fill out host information

<figure><img src="https://3651363121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXRfFXlnajFLDrEaLTRkL%2Fuploads%2FuCaZPJx3HGFJYMfwNMnu%2Fimage.png?alt=media&#x26;token=ca4bb0e5-a4f7-490a-a535-622c8bf1af98" alt=""><figcaption><p>This is for the Ubuntu box</p></figcaption></figure>

5. Allocate proper resources for box.
6. For storage make sure to have `Thin Provisioned`.

<figure><img src="https://3651363121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXRfFXlnajFLDrEaLTRkL%2Fuploads%2FFAmqCQpPGpDeza37v5Q9%2Fimage.png?alt=media&#x26;token=d2ac17e8-a0b8-49e5-9007-a84b3a34e020" alt=""><figcaption></figcaption></figure>

### Vyos Box

1. Vyos (Install is pretty simple)
   1. Login (Default is vyos vyos)
   2. Type install \`Install image\` and follow prompt
   3. For password make it basic then when we make linked clones that’s when we set the complex password
   4. Reboot
2. You must delete the interfaces as the mac address is baked into the config

<pre><code><strong>configure
</strong><strong>delete interfaces ethernet eth0 hw-id
</strong>delete interfaces ethernet eth1 hw-ed
commit
save
</code></pre>

<figure><img src="https://lh5.googleusercontent.com/L08LVPFlJyDcDrgsHKV5t5ljMIZzheuGjXMpakNiF1vbXsBl83QaLw1avlp8gP72vA8wtDGfo_jc5Oec9kUSZ3MZMTVd_BlhBH5-ArdmXV9OWNFSBWOKt8PVvC_wUCkDdFPX2qDhHNchTaNJJvPizMNEqStbXMmQTiXlDZZO_N3YFOnyoJwXMb2dKZxvLA" alt=""><figcaption></figcaption></figure>

First command is `to allow dhcp on boot` and the second is `to make sure ssh is listening anywhere`

```
set interfaces ethernet eth0 address dhcp 
set service ssh listen-address 0.0.0.0 
```

1. poweroff

#### Prepare VYOS for base VM

1. Remove the CDrom
2. Take a snapshot of 480-fw
   * Use \`Base\` for base vm snapshots
3. Turn back on Vyos

<figure><img src="https://lh5.googleusercontent.com/d_vyZsd5Hnj8MQJo6NHIu8_nIATHenjlVwnRdoQFwuVpv8tg75ZESS6Bbk-Pt8ODQpC0yFHxnZL1yL4p_v9BBInGLlBzUu1WK4G9sV4kOD3Yl0WVZLxH2piLFXYCf8X5xc24_UrLMOO4Kyic9VqO_v05yfQXfHL2bg1s_tX5tI7O8L8Ieat4RkoRnMYhtQ" alt=""><figcaption><p>From DHCP</p></figcaption></figure>

#### VYOS Config for Milestone 1:

```
set interfaces ethernet eth0 description CYBERLAB
set interfaces ethernet eth1 description 480-WAN
delete interfaces ethernet eth0 address dhcp
set interfaces ethernet eth0 address 192.168.7.62/24
set interfaces ethernet eth1 address 10.0.17.2/24
set protocols static route 0.0.0.0/0 next-hop 192.168.7.250
set system name-server 192.168.4.4
set system name-server 192.168.4.5
set service dns forwarding listen-address 10.0.17.2
set service dns forwarding allow-from 10.0.17.0/24
set service dns forwarding system
set nat source rule 10 source address 10.0.17.0/24
set nat source rule 10 outbound-interface eth0
set nat source rule 10 translation address masquerade
set system host-name 480-fw
```

<figure><img src="https://lh5.googleusercontent.com/k8N2FHyR79JzRRWHF8oOjqXfISqNZxJBI82AIUD7w0D4xYMhRrAerjOq-zM0qSzsBffKeCCZEl7OJ2P_ge8oWdoxvYfHcbh9piZ6jAVl8QjaZxJhBt_kov4E31r2d7M3fwiTAKk0KJcCEO_VA2-QNud2AUs7_K-zYE7Hg264stbMpkvzRHRiBncXZJ2xOQ" alt=""><figcaption><p>Static Interfaces</p></figcaption></figure>

### Ubuntu Box

1. Make sure to have the xubuntu iso
2. Install is very straight forward (any other debian based install)
3. Have very default password
4. Now run Devins script for setup

```
wget https://raw.githubusercontent.com/gmcyber/RangeControl/main/src/scripts/base-vms/ubuntu-desktop.sh
chmod +x ubuntu-desktop.sh
./ubuntu-desktop.sh
rm *.deb ubuntu-desktop.sh
showdown -h now
```

5. Take snapshot of VM
   * Use \`Base\` for base vm snapshots
6. Turn on vm and delete default user

```
sudo adduser paul
usermod -aG sudo paul
```

7. Logout / Login paul

```
userdel -r champuser
```

8. Now network xubuntu box

<figure><img src="https://3651363121-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FXRfFXlnajFLDrEaLTRkL%2Fuploads%2FvYQil3ZlZ4bqqpnLPK1r%2Fimage.png?alt=media&#x26;token=c79fcc3e-8f55-4d7b-abb8-3524becafb77" alt=""><figcaption><p>Network Config</p></figcaption></figure>

9. Set hostname

```
sudo hostnamectl set-hostname xubuntu-wan
```

10. All Done now proof time!

[Proof](https://drive.google.com/file/d/168Z8_JK3f2nEerMw0A2fxGacqig_0VIX/view?usp=sharing)
