I have published some logic that generates dnsmasq configuration from a gestioip mysql database. It generates dynamic ranges, static dhcp assignments, and hosts file entries. Project: https://github.com/svdasein/gestio2masq Install: "gem install gestio2masq"