Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| dhcp_server [13 July 2025 / 21:11:31] – created kadek | dhcp_server [10 October 2025 / 12:59:59] (current) – kadek | ||
|---|---|---|---|
| Line 14: | Line 14: | ||
| sudo nano / | sudo nano / | ||
| - | * 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=" | ||
| - | INTERFACESv4=" | ||
| - | |||
| * 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/ | ||
| + | |||
| + | * 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 / | ||
| + | |||
| + | * Verify that the DHCP server is listening on the correct network interface: | ||
| + | |||
| + | sudo netstat -uap | grep dhcpd | ||
