There is no license information available for the latest version (v0.0.11) of this package.

Tool for managing `address` entries in dnsmasq

v0.0.11 2018-06-22 01:42 UTC

This package is not auto-updated.

Last update: 2023-03-26 22:53:21 UTC


Tool for pointing wildcarded domains to your local development machine

Dnsmasq provides network infrastructure for small networks. dnsmasq-mgmt is a tool that installs Dnsmasq and eases the configuration to locally point domains to IP addresses of your choosing.

dnsmasq-mgmt was built to avoid manually updating Dnsmasq or /etc/hosts configuration files.

Currently dnsmasq-mgmt is only supported on macOS.


Use composer to install dnsmasq-mgmt via:

composer global require "lightster/dnsmasq-mgmt=~0.0.9"

Then allow dnsmasq-mgmt to restart Dnsmasq and clear the operating system's DNS cache without requesting the sudo password each time:

sudo ~/.composer/vendor/bin/dnsmasq-mgmt sudoers:install

The last step in installation is to actually install Dnsmasq and setup directories utilized by Dnsmasq:

~/.composer/vendor/bin/dnsmasq-mgmt dnsmasq:install

Configuring domains

Adding a domain

To have point and subdomains of point to localhost, run:

~/.composer/vendor/bin/dnsmasq-mgmt address:add

Removing a domain

To remove, run:

~/.composer/vendor/bin/dnsmasq-mgmt address:add

Advanced usage

Make dnsmasq-mgmt readily available

Rather than needing to call dnsmasq-mgmt with a path of ~/.composer/vendor/bin/dnsmasq-mgmt every time, add ~/.composer/vendor/bin/ to the PATH environment variable in your ~/.bash_profile configuration:


Other commands

dnsmasq-mgmt offers a few other commands. You can get a full list of commands by running the list subcommand:

dnsmasq-mgmt list

Install shell completion

If you are using bash or zsh, you can install shell completion for dnsmasq-mgmt.

For Bash, add the following to your ~/.bashrc (or ~/.bash_profile):

source  ~/.composer/vendor/lightster/dnsmasq-mgmt/bin/dnsmasq-mgmt-completion.bash

For zsh, add the following to your ~/.zshrc:

source  ~/.composer/vendor/lightster/dnsmasq-mgmt/bin/dnsmasq-mgmt-completion.zsh