Build Steps from Labs - samuel-richardson/Sam-Tech-Journal GitHub Wiki
Cabling in Vcenter
- Right-click on the VM and hit enter settings.
- To change the wiring using the drop-down on the network adapter.
- To add a new network adapter, select Add New Device and then select the wiring.
Assign Interfaces in PFsense
- Enter 1 in the Pfsense console.
- Now, the valid interfaces should be shown on screen. Confirm these are the same as the mac address and interfaces assigned in Vcenter.
- Set the Wan and Lan interface to the matching connection.
Set interface IPs
- Select 2
Set wan IP
- Select 1
- skip DHCP
- enter wan IP
- enter subnet mask size
- Enter the upstream gateway
Set LAN IP
- Select 2
- skip DHCP
- Enter lan IP
- Enter subnet mask size
Set network information on windows computer.
- Go to IPV4 Properties
- Configure gateway, subnet, and IP address.
Configuring Pfsense in GUI
- go to the IP of the PfsenseFW and login
- set host and domain names.
- Enter a DNS such as 8.8.8.8
AD
- Configure vm to run on lan.
- Sart server manager.
- Connect to network with FW as a default gateway and change hostname.
- Restart, check hostname and network connectivity.
Install ADDS Role
- In server manager, hit manage > add roles and features.
- Add Active Directory Domain Service
- Promote server to a domain controller. Make sure the name change is applied.
- Root domain name is samuel.local
- Restart
DNS
- After reboot DNS should be installed.
- Go to DNS manager.
- Right-click Forward lookup zone and add a New host.
- Will get a DNS error
- Now, in reverse Lookup Zones, add a New Zone
- Identify the reverse lookup zone by entering the network id
- Now uncheck PTR, Apply, then recheck PTR apply to do a reverse lookup
- This should make the reverse lookup zone 5.0.10.
Create users
- From server manager got to AD DS and Go to Active Directory Users and Computers
- In the user folder, add 2 new users. One with ADM and one without.
- Add the admin account to the Domain Admins group.
WKS 01
- set DNS to ad's IP address
- Log in to wks01 and go to where the name would be changed and change the group to the AD domain.
- Restart
- Should be able to log into wks01 with adm and unprivileged accounts.
Linux Configuration
Networking(configure the static IP address.)
- Detailed info found here
- Navigate to /etc/sysonfig/network-scripts.
- Edit ifcfg-interfacename(this is ens192 in the centos VM). Change or add the following fields as specified.
BOOTPROTO=none
ONBOOT=yes
IPADDR=10.0.5.3(New address for linux box)
PREFIX=24(Subnet)
GATEWAY=10.0.5.2(ip of gateway FW)
DNS1=10.0.5.5(ip of DNS server)
DOMAIN=samuel.local(The domain name sent up earlier.)
- Restart network
systemctl restart network
- Test connectivity. ping outside domain and hostnames in the network.
Adding a privileged user.
- add user
useradd username
- change password
passwd username
- add user to group
usermod -g group username
Add Linux to DNS
- On ad go to DNS manager and add a new A or AAAA host to the local domain.
Remote access via SSH.
ssh username@dhcp01-samuel
- Get root privileges with
sudo
,sudo su
,sudo -i
. sudo -i
is best practice- Command history can be seen with the
history
command
Setting up DHCP server
Configure DHCP
- Install dhcp with
yum install dhcp
- Edit the
/etc/dhcp/dhcpd.conf
file. - Add
subnet 10.0.5.0 netmask 255.255.255.0 {
`option routers 10.0.5.2;`
`option subnet-mask 255.255.255.0;`
`option domain-name "samuel.local";`
`option domain-name-servers 10.0.5.5;`
`range 10.0.5.100 10.0.5.150;`
}
-
Additional Options for lease
Default-lease-time 3600; Max-lease-time 14400;
-
Start dhcp with
systemctl start dhcpd
-
Check if it's running.
-
Enable the service to start on boot with
systemctl enable dhcpd
Configure Firewall
- View firewall services with
firewall-cmd --list-all
- Add dhcp to firewall with
firewall-cmd --add-service=dhcp --permanent
- Reload firewall
firewall-cmd --reload
workstation changes
- Configure adapter to use DHCP over ipv4.