Lab04 Setup - jacob-dinapoli/tech-journal GitHub Wiki
First Step: SSH from AD01 -> DHCP01
Install PuTTY from online.
Within the PuTTY configuration, put the host name for the dhcp01 server
dhcp01-jacob.dinapoli
Within the dhcp01 vm, connect to the local server
Type in the following commands to make sure
pwd
hostname
whoami
sudo yum install dhcp
Second Step: Configuring the DHCP Services
Become the system user for a brief periof of time using the sudo -i command and then open the dhcp configuration file using the vi or nano text editor
Type the following commands:
sudo -i
nano /etc/dhcp/dhcpd.conf
This will bring up a nano file
Type the following under the text
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 "jacob.local";
option domain-name-servers 10.0.5.5;
range 10.0.5.100 10.0.5.150;}
Save the nano file
Third Step: Starting DHCP Services
To start dhcp, type the following command as root:
systemctl start dhcpd
Run a status check
systemctl status dhcpd
Fourth Step: Enabling the service to start at boot
Type the following command to make sure you enabled the dhcpd:
systemctl enable dhcpd
Fifth Step: Configuring the Firewall to allow incoming DHCP requests
The default configuration on CentOS is to enable the firewall and allow both ICMP and SSH requests in. The DHCP server will not work until we enable the firewall. We will be using firewalld and the firewall-cmd utility to make this happen. The “firewall-cmd --list-all” option shows the default firewall that allows dhcpv6-client (not to be confused with dhcp server) and ssh.
We will add the dhcp service:
firewall-cmd --list-all
The following syntax, adds the ports associated with dhcp permanently. The --permanent flag is important. If you fail to add this, the next time you reboot, your changes will be lost. Make sure you reload the firewall to invoke the change.
List all the rules and make sure your dhcp service has been added:
firewall-cmd --add-service=dhcp --permanent
firewall-cmd --reload
firewall-cmd --list-all
Exit to leave elevated state and PuTTY
Sixth Step: Windows 10 DHCP Client
As a privileged user, you will now re-configure networking on WKS01 to use dynamic addressing rather than static addresses.