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 ...

Get CentOS 6 Linux Server Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.