Merge in DNS/adguard-home from 4705-fix-opts to master Updates #4705. Squashed commit of the following: commit d3924c443260af3d32d73bd784efff2bf8dd612e Merge: e46198c6e545f3bdAuthor: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Sep 5 16:57:38 2022 +0300 Merge branch 'master' into 4705-fix-opts commit e46198c6d8da4dcadabecfd9c1b33cc472efe612 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Mon Sep 5 16:52:20 2022 +0300 dhcpd: immp docs commit 1c1caeaa1b2eb642fa83aa5a88ec041af9963591 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Sat Sep 3 17:31:35 2022 +0300 dhcpd: fix logic, imp docs commit bc74e21b9eb79fe22170b0e02cddcbd4bf78d860 Merge: 280ad10f1fb04376Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Sep 2 18:58:52 2022 +0300 Merge branch 'master' into 4705-fix-opts commit 280ad10f63f954f89b42cdf206a8240f8d4de503 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Fri Sep 2 00:53:38 2022 +0300 dhcpd: imp docs, tests commit 600fa44f35683ba4b340843be13786e9383ead89 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Sep 1 20:24:52 2022 +0300 dhcpd: add new opts commit caf0cc6b370a04e6e002428b49f8d54cba105d5a Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Sep 1 18:13:02 2022 +0300 dhcpd: log changes commit 3d2c61d9b8fd19c8d1e4f43ac9aac3cb94cdd4d3 Author: Eugene Burkov <E.Burkov@AdGuard.COM> Date: Thu Sep 1 18:09:34 2022 +0300 dhcpd: imp opts
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.
-
To see the current IP address on client OS you can use
ip acommand on Linux oripconfigon Windows. -
To force the client OS to request an IP from DHCP server again, you can use
dhclienton Linux oripconfig /releaseon Windows.
Configure server
-
Edit server configuration file 'AdGuardHome.yaml', for example:
dhcp: enabled: true interface_name: vboxnet0 dhcpv4: 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 options: [] dhcpv6: range_start: 2001::1 lease_duration: 86400 ra_slaac_only: false ra_allow_slaac: false -
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