Logging events with dnsmasq and combining this with logrotate
In this recipe we will learn how to log events with dnsmasq and provide for log rotation using logrotate.
Without any additional configuration dnsmasq will send all log messages to the generic system log. However, where convenience and simplicity marks the road to success, it is the purpose of this recipe to show you how the log facility in dnsmasq can not only support the use of a standalone logfile, but how you can add dnsmasq to logrotate with the help of a new system user.
Getting ready
To complete this recipe you will require a working installation of the CentOS 6 operating system with root privileges, a static IP address, and a console-based text editor of your choice. It is assumed that you have already installed dnsmasq as a result of the advice provided by the previous recipe.
If you are running a firewall, you will need to confirm that the firewall has been disabled, removed, or the appropriate ports are open. Similarly...