Install Dnsmasq which is the lightweight DNS forwarder and DHCP Server Software.
Install Dnsmasq:-
Configure Dnsmasq:-
[root@server ~]# vi /etc/dnsmasq.conf
# line 19: uncomment (never forward plain names)
domain-needed
# line 21: uncomment (never forward addresses in the non-routed address spaces)
bogus-priv
# line 41: uncomment (query with each server strictly in the order in resolv.conf)
strict-order
# line 55: add if you need
# query the specific domain name to the specific DNS server
# the example follows means query [server.example] domain to the [10.0.0.0] server
server=/server.example./10.0.0.10
# line 123: uncomment (add domain name automatically)
expand-hosts
# line 133: add (define domain name)
domain=example.com
[root@server ~]# systemctl start dnsmasq
[root@server ~]# systemctl enable dnsmasq
For DNS records, add them in /etc/hosts. Then, Dnsmasq will answer to queries from clients.
If Firewalld is running, allow DNS service.
Verify to resolve Name or IP address from a client in internal network.