Step 1
Installing isc-dhcp server

To install isc-dhcp server on Ubuntu 14.04, use the following commands Update Linux files

Update command will fetch the packages from its location and updates them to newer version.

# apt update

Installs isc-dhcp Server

# apt install isc-dhcp-server


Step 2

Configuring isc-dhcp sever – /etc/dhcp/dhcpd.conf

The isc-dhcp server configuration file is dhcpd.conf and can be accessed using the following command

# vi /etc/dhcp/dhcpd.conf

This command will allow to make changes in the dhcp configuration file “dhcpd.conf” which is at specified path.

We are required to do the following modifications in dhcpd.conf file:

subnet 192.168.1.0 netmask 255.255.255.0 {
    range 192.168.1.128 192.168.1.145;
    option routers 192.168.1.1;
    option broadcast-address 192.168.1.255;
    default-lease-time 3600;
    max-lease-time 7200;
}
option domain-name-servers 192.168.1.10 192.168.1.254;
option domain-name "nodisk.org";  // specified my domain

The following command is used to make the DHCP server an authoritative server for local network.

     authoritative;

The following command is used to check the syntax of dhcpd.conf file for errors

# dhcpd -t

The following command will allow to edit the isc-dhcp-server file, where we can manually determine the interface of the server.

 # vi /etc/default/isc-dhcp-server

We have to set the interfaces to wlan0 in our file

     INTERFACES= "en0"

The following line will display the contents of the current routing tables.

# ip route list



Step 3
Securing DHCP server The following modifications are done to configuration file to secure the DHCP server

ddns-update-style none;
deny declines;
deny bootp;

The DoS attack on DHCP server can be avoided by denying the DHCP decline messages and can deny supporting old bootp clients.



Step 4
Restart isc-dhcp server

Now that the isc-dhcp-server configuration is complete, we need to reload the dhcp server, so that the new configurations can be implemented

# systemctl isc-dhcp-server restart
# systemctl isc-dhcp-server start
# systemctl isc-dhcp-server stop



Step 5
Verifying.. Inorder to check the leases of the IP addresses assigned by the DHCP

# less /var/lib/dhcp/dhcpd.leases