dhcp2 kitten - Brandon-Duffy/SYS-265 GitHub Wiki
dhcp2-kitten
This entry describes how dhcp2-kitten was configured.
Network Configuration
Address: 172.16.1.11/24
Gateway: 172.16.1.2
DNS: 172.16.1.2
Use nmtui
to configure the static IP address, gateway, and DNS settings:
nmtui
Set the following values:
- IP address: 172.16.1.15/24
- Gateway: 172.16.1.2
- DNS: 172.16.1.12, 172.16.1.13
- Domain: kitten.local
Installation and Configuration
-
Install the DHCP server package:
yum install -y dhcp
-
Create a backup of the default configuration file:
cp /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.bak
-
Create a new configuration file with the following content:
default-lease-time 604000;
max-lease-time 604010;
subnet 172.16.1.0 netmask 255.255.255.0 {
option routers 162.16.1.2;
option subnet-mask 255.255.255.0;
option domain-name "kitten.local"'
option domain-name-servers 172.16.1.2;
range 172.16.1.100 172.16.1.150;
}
-
Enable and start the DHCP server:
systemctl enable dhcpd systemctl start dhcpd
-
Configure the firewall to allow DHCP traffic:
firewall-cmd --permanent --add-service=dhcp firewall-cmd --reload
-
Create the admin user "kitten2" and set the password "ropebucket2!":
adduser kitten2 echo "kitten2:ropebucket2!" | chpasswd
-
Add the "kitten2" user to the sudoers file:
echo "kitten2 ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
DHCP2-kitten is operational.