lab4 ‐ RAM - ryanm292002/SEC480 GitHub Wiki

4.1 Setting up Active Directory LDAP

  1. Setup AD certificate via PowerShell (get ldap up and running) Get-WindowsFeature -Name AD-Certificate Install-WindowsFeature ADCS-Cert-Authority -IncludeManagementTools

image

Install-AdcsCertificationAuthority -CAType EnterpriseRootCa -CryptoProviderName "RSA#Microsoft Software Key Storage Provider" -KeyLength 2048 -HashAlgorithmName SHA512 -ValidityPeriod Years -ValidityPeriodUnits 3

  • Verify the certificate works (open in dc1) image
  • Second Verification netstat -ano | findstr 636
  1. Go to administrative area of vsphere client >> Single Sign on Section image

  2. Join the vsphere client to domain (ryan.local) image]

  3. Reboot Node (CLI) (https://portal.nutanix.com/page/documents/details?targetId=vSphere-Admin6-AOS-v6_7:vsp-node-restart-vsphere6-t.html)

  • Administration >> deployment >> system configuration >> reboot node
  1. Create ou structure (ad users groups on dc1) image

  2. Create vcenterldap service account (this will be the account that binds to vcenter sso)

  3. Create vcenter-admin AD group (add your -adm user) this is the group that will bind to vcenter, if the user is inside the group they will be able to login

  4. Copy AD cert to xubuntu-wan (get the cert with the following command) openssl s_client -connect dc1.ryan.local:636 -showcerts

  5. Add new SSO Identity source Provider on vcenter (Active Directory over LDAP) image

  6. Need the proper “DNs” for users and groups OU’s in AD (configure properly, add cert taken from dc1) image

  7. Add your vcenter-admin account to SSO Users and Groups - Administrators in vcenter (added the vcenter-admins group from step 7 above) image

4.2 Creating first clone

Follow Xubuntu dependencies for Powercli and Ansible on xubuntu-wan https://greenmountaincyber.com/docs/topics/vmware/powercli/xubuntu-dependencies Powercli to clone DC1 to make a server2019 base VM https://greenmountaincyber.com/docs/topics/vmware/powercli/extracting-snapshots Repeat steps used for DC1 to make vyos and xubuntu base vms

  1. After installing dependecies linked above, should be able to run powershell front xubuntu terminal, set vcenter variable to domain name image

  2. Connect to vcenter with newly created variable Connect-VIServer -Server $vcenter

image

  1. Quick check of what vms are in vcenter get-vm

image

  1. Set variable to dc1 from get-vm check $vm = get-vm -Name dc1

image

  1. Create snapshot variable and capture snapshot using $vm variable $snapshot = Get-Snapshot -VM $vm -Name "Base" image

  2. Check vmhost // create vmhost variable image

Get-VMhost

  1. Create data store variable: image

  2. Create linked clone variable image

  3. Create a new linked clone, once the linked clone is made you can create new base VMS image

image

  1. Take a snapshot of the base VM image

  2. Remove the linked clone image

4.3 Ubuntu-LinkedClone

  1. Create 2 new vmware folders (prod, base VM)

  2. Prepare ubuntu-server iso

  1. Follow instructions to setup the VM correctly. https://greenmountaincyber.com/docs/topics/vmware/base-vms/ubuntu-server/

  2. During installation, create rangeuser image

  3. Disbale ipv6 sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1 sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1 sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1

  4. pull the following script down, then run the script, after script is done, shutdown, remove CD, take a snapshot called "base" wget https://raw.githubusercontent.com/gmcyber/RangeControl/main/src/scripts/base-vms/ubuntu-server.sh

  5. Run the script "clone.ps1" in the code section to easily create linked clone, create base vm based off that linked clone and then delete the linked clone https://github.com/ryanm292002/SEC480/blob/main/clone.ps1