Skip to main content

How to configure DHCP in Linux

sudo apt-get install isc-dhcp-server -y

sudo vim /etc/default/isc-dhcp-server

DHCPDv4_CONF=/etc/dhcp/dhcpd.conf
DHCPDv4_PID=/var/run/dhcpd.pid
INTERFACESv4="eth0"

sudo vim /etc/dhcp/dhcpd.conf

option routers IP_KALI;
option domain-name "kali.test";
option domain-name-servers 8.8.8.8, 8.8.4.4;
subnet 10.0.0.0 netmask 255.255.255.0 {
  range 10.0.0.50 10.0.0.100;
}

sudo service isc-dhcp-server start