dnsmasq Howto (1)
Installation
Update the system:
dnf updateinfo
dnf -y upgrade
Install the required packages:
dnf -y install 'dnsmasq'
Configuration
Edit the configuration files:
Delete the configuration directory:
rm --recursive '/etc/dnsmasq.d'
Validate the configuration:
dnsmasq --test
Start the service & get its status:
systemctl start 'dnsmasq.service'
systemctl status 'dnsmasq.service'
Observe its logs:
journalctl --unit='dnsmasq.service' --since 'today' --follow
Observe its open ports:
lsof -a -c 'dnsmasq' -i -n -P
Enable the service & check it:
systemctl enable 'dnsmasq.service'
systemctl list-unit-files | grep 'dnsmasq.service'
Open the firewall ports:
firewall-cmd --add-service='dns' --add-service='dhcp' --permanent
firewall-cmd --reload
firewall-cmd --list-all | grep 'services'
Test
Observe its open ports:
lsof -a -c 'dnsmasq' -i -n -P
Output:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
dnsmasq 675 dnsmasq 4u IPv4 25887 0t0 UDP *:67
dnsmasq 675 dnsmasq 6u IPv4 25890 0t0 UDP *:53
dnsmasq 675 dnsmasq 7u IPv4 25891 0t0 TCP *:53 (LISTEN)
dnsmasq 675 dnsmasq 8u IPv6 25904 0t0 UDP *:53
dnsmasq 675 dnsmasq 9u IPv6 25905 0t0 TCP *:53 (LISTEN)
Resolve the web server's hostname:
dig 'ntp.raysoft.loc'