I have a DHCP and DNS server running from BIND on CentOS 7. Clients (Windows and Linux) automatically DHCP to the CentOS server and everything works hunky-dory. However, the only way DNS works is if I set the DNS server manually on Windows and Linux clients. Is there a way to broadcast as a DNS server? Or should I be setting my DNS server on my router (pfSense)?
2 Answers
This can be served through DHCP options and depends on the DHCP server you are using. Assuming that you use isc-dhcpd
the required option in the config would be option domain-name-servers 192.168.1.10, 192.168.1.11
.
As this option is a standard dhcp option the clients should set the DNS servers as specified.
The DNS server should set as a scope option on your DHCP server. If you're using BIND I believe it can be set in the DHCP server configuration:
option domain-name-servers [CentOS7machineIP];
Then when your windows/linux clients grab an address, they will also get the DNS server settings.
Personally, if I had a PFSense on the same network I would be running DHCP and DNS from that instead.
Cheers
Luke