Squashed commit of the following:
commit 140ac16568383cab2270e5d5ba895959902dd943
Merge: d5ed73b5 cb6ca3b0
Author: Simon Zolin <s.zolin@adguard.com>
Date: Tue Aug 25 13:46:34 2020 +0300
Merge remote-tracking branch 'origin/master' into 1585-dhcp-options
commit d5ed73b5e4f068b823fe97ab1161753670d10387
Author: Simon Zolin <s.zolin@adguard.com>
Date: Fri Aug 21 18:16:41 2020 +0300
minor
commit f5208a0b050c2dd462b32edee0379758cc6e5003
Author: Simon Zolin <s.zolin@adguard.com>
Date: Mon Jun 1 14:09:39 2020 +0300
+ dhcpv4 custom options
DHCP server
Contents:
Test setup with Virtual Box
To set up a test environment for DHCP server you need:
- Linux host machine
- Virtual Box
- Virtual machine (guest OS doesn't matter)
Configure client
-
Install Virtual Box and run the following command to create a Host-Only network:
$ VBoxManage hostonlyif createYou can check its status by
ip acommand.You can also set up Host-Only network using Virtual Box menu:
File -> Host Network Manager... -
Create your virtual machine and set up its network:
VM Settings -> Network -> Host-only Adapter -
Start your VM, install an OS. Configure your network interface to use DHCP and the OS should ask for a IP address from our DHCP server.
Configure server
-
Edit server configuration file 'AdGuardHome.yaml', for example:
dhcp: enabled: true interface_name: vboxnet0 gateway_ip: 192.168.56.1 subnet_mask: 255.255.255.0 range_start: 192.168.56.2 range_end: 192.168.56.2 lease_duration: 86400 icmp_timeout_msec: 1000 -
Start the server
./AdGuardHomeThere should be a message in log which shows that DHCP server is ready:
[info] DHCP: listening on 0.0.0.0:67