Respond to A records based on host list file.
-
Create a host list file in ./conf/hosts. This file is similar to the /etc/hosts file.
test.service 192.168.0.2 test.domain 192.168.0.3 some.test.domain 192.168.0.4
-
Build and run binary
make run
-
Or build and run binary within Docker
make run_docker
- Configuration file name is 'dns-server.yaml'
- The configuration file must be placed in one of the following directories.
- .dns-server/conf directory under user's home directory
- 'conf' directory where running the binary
- 'conf' directory where placed in the path of 'DNS_SERVER_ROOT' environment variable
- Configuration options
- host_list_file : Path of the host list file.
- listen
- port : Listen port of the DNS server.
- Configuration file example
dns-server: host_list_file: ./conf/hosts listen: port: 53