Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
dhcp_server [13 July 2025 / 21:11:31] – created kadekdhcp_server [10 October 2025 / 12:59:59] (current) kadek
Line 14: Line 14:
   sudo nano /etc/default/isc-dhcp-server   sudo nano /etc/default/isc-dhcp-server
  
-  * For example, if your DHCP interface is enp0s8, update the line as follows:+  * For example, if your DHCP interface is tap_vpn, update the line as follows: 
 + 
 +  INTERFACESv4="tap_vpn"
  
-  INTERFACESv4="enp0s8" 
-    
    * Configure the DHCP setting by editing the config file:    * Configure the DHCP setting by editing the config file:
  
Line 33: Line 33:
   option routers 192.168.30.1;   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