Skip to content

Instantly share code, notes, and snippets.

@ricardoaguiar
Created April 15, 2020 16:43
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save ricardoaguiar/dd34c16d8b33d41aa56228d33270b661 to your computer and use it in GitHub Desktop.
Save ricardoaguiar/dd34c16d8b33d41aa56228d33270b661 to your computer and use it in GitHub Desktop.
Install and uninstall dnsmasq #Dnsmasq #TipsTricks

Install

  1. brew install dnsmasq
  2. cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf now this is automatically done by the dnsmasq installation
  3. Replace this in /usr/local/etc/dnsmasq.conf file:
address=/test/127.0.0.1
listen-address=127.0.0.1
  1. sudo mkdir -v /etc/resolver
  2. sudo touch /etc/resolver/test
  3. sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/test'
  4. sudo brew services start dnsmasq
  5. Restart your Mac to make it work

Uninstall

  1. sudo brew services stop dnsmasq
  2. rm -f /usr/local/etc/dnsmasq.conf
  3. sudo rm -rf /etc/resolver
  4. brew uninstall --force dnsmasq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment