Configure a DHCP server on Kali Linux
Installing dhcp server:
Define a static IP for the server
Configure DHCP server settings at /etc/dhcp/dhcpd.conf
Restart dhcp-server
by do son · Published · Updated
apt-get install isc-dhcp-server
nano /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.0.2 # server's IP address
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.1.255
gateway 192.168.0.1 #router's IP address
nano /etc/dhcp/dhcpd.conf
default-lease-time 600;
max-lease-time 7200;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name "yourdomainname.com";
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.150 192.168.0.200; #Range of client's IP addresses: 150 to 200
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
}
/etc/init.d/isc-dhcp-server restart
Restart eth0
#ifdown eth0
#ifup eth0