mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-22 13:05:36 +03:00
49a92605b8
Close #1682
Squashed commit of the following:
commit 2fad3544bf8853b1f8f19ad8b7bc8a490c96e533
Author: Simon Zolin <s.zolin@adguard.com>
Date: Mon Jun 22 17:32:45 2020 +0300
minor
commit 7c17992424702d95e6de91f30e8ae2dfcd8de257
Author: Simon Zolin <s.zolin@adguard.com>
Date: Mon Jun 22 16:09:34 2020 +0300
build
commit 16a52e11a015a97d3cbf30362482a4abd052192b
Merge: 7b6a73c8
|
||
---|---|---|
.. | ||
standalone | ||
check_other_dhcp.go | ||
db.go | ||
dhcp_http.go | ||
dhcpd.go | ||
dhcpd_test.go | ||
filter_conn.go | ||
helpers.go | ||
network_utils.go | ||
network_utils_test.go | ||
os_linux.go | ||
os_unix.go | ||
os_windows.go | ||
README.md |
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 create
You can check its status by
ip a
command.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
./AdGuardHome
There should be a message in log which shows that DHCP server is ready:
[info] DHCP: listening on 0.0.0.0:67