This is an old revision of the document!
ISC-DHCP-Server Installation
- Run the following command to start the installation:
sudo apt update sudo apt install isc-dhcp-server
- You may check the DHCP version:
dhcpd --version
- Configure the network interfaces that the DHCP server will use by editing the config file:
sudo nano /etc/default/isc-dhcp-server
- For example, if your DHCP interface is tap_vpn, update the line as follows:
INTERFACESv4="tap_vpn"
- Configure the DHCP setting by editing the config file:
sudo nano /etc/dhcp/dhcpd.conf
- This part set the domain name and DNS servers:
option domain-name "example.com"; option domain-name-servers 8.8.8.8, 8.8.4.4;
- This part set the subnet and IP address range:
subnet 192.168.30.0 netmask 255.255.255.0 {
range 192.168.30.100 192.168.30.200;
option routers 192.168.30.1;
}
- Set the lease time:
default-lease-time 600; max-lease-time 7200;
- Assign IP address to the device before started the DHCP service (this is mandatory):
sudo ip addr add 192.168.30.1/24 dev tap_vpn
- Start the service:
sudo systemctl start isc-dhcp-server
- Enable the service:
sudo systemctl enable isc-dhcp-server
- Show the service status:
sudo systemctl status isc-dhcp-server
Troubleshooting Common Issues
- Check the DHCP server logs for any error messages:
sudo tail -f /var/log/syslog | grep dhcpd
- Verify that the DHCP server is listening on the correct network interface:
sudo netstat -uap | grep dhcpd
